mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-22 08:53:31 +02:00
enc: add config rest client
This commit is contained in:
parent
61b4120e30
commit
8c91594e60
4 changed files with 95 additions and 11 deletions
|
@ -26,7 +26,7 @@
|
||||||
"neoscroll.nvim": { "branch": "master", "commit": "a731f66f1d39ec6175fd201c5bf849e54abda99c" },
|
"neoscroll.nvim": { "branch": "master", "commit": "a731f66f1d39ec6175fd201c5bf849e54abda99c" },
|
||||||
"noice.nvim": { "branch": "main", "commit": "f65b6b7ab87796f93ea8f8a92d5a64dc53d912d1" },
|
"noice.nvim": { "branch": "main", "commit": "f65b6b7ab87796f93ea8f8a92d5a64dc53d912d1" },
|
||||||
"none-ls-extras.nvim": { "branch": "main", "commit": "336e84b9e43c0effb735b08798ffac382920053b" },
|
"none-ls-extras.nvim": { "branch": "main", "commit": "336e84b9e43c0effb735b08798ffac382920053b" },
|
||||||
"none-ls.nvim": { "branch": "main", "commit": "8691504118b252d64fc5023a104aedd100ab754a" },
|
"none-ls.nvim": { "branch": "main", "commit": "cc0a3c45047e3daf85d07c1571d65476cfce6480" },
|
||||||
"nui.nvim": { "branch": "main", "commit": "a0fd35fcbb4cb479366f1dc5f20145fd718a3733" },
|
"nui.nvim": { "branch": "main", "commit": "a0fd35fcbb4cb479366f1dc5f20145fd718a3733" },
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" },
|
"nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" },
|
"nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" },
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
|
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
|
||||||
"nvim-scrollview": { "branch": "main", "commit": "c29c5f69d37040a1fac88cbea7f5e6f06f0aff4d" },
|
"nvim-scrollview": { "branch": "main", "commit": "c29c5f69d37040a1fac88cbea7f5e6f06f0aff4d" },
|
||||||
"nvim-tree.lua": { "branch": "master", "commit": "2086e564c4d23fea714e8a6d63b881e551af2f41" },
|
"nvim-tree.lua": { "branch": "master", "commit": "2086e564c4d23fea714e8a6d63b881e551af2f41" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "cdc613c630598779dc9f975bae12a4dc7c001950" },
|
"nvim-treesitter": { "branch": "master", "commit": "8dd40c7609c04d7bad7eb21d71f78c3fa4dc1c2c" },
|
||||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "34867c69838078df7d6919b130c0541c0b400c47" },
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "34867c69838078df7d6919b130c0541c0b400c47" },
|
||||||
"nvim-ts-autotag": { "branch": "main", "commit": "06fe07d7523ba8c755fac7c913fceba43b1720ee" },
|
"nvim-ts-autotag": { "branch": "main", "commit": "06fe07d7523ba8c755fac7c913fceba43b1720ee" },
|
||||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "cb064386e667def1d241317deed9fd1b38f0dc2e" },
|
"nvim-ts-context-commentstring": { "branch": "main", "commit": "cb064386e667def1d241317deed9fd1b38f0dc2e" },
|
||||||
|
@ -45,6 +45,7 @@
|
||||||
"playground": { "branch": "master", "commit": "bcfab84f98a33f2ad34dda6c842046dca70aabf6" },
|
"playground": { "branch": "master", "commit": "bcfab84f98a33f2ad34dda6c842046dca70aabf6" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" },
|
"plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" },
|
||||||
"rainbow-delimiters.nvim": { "branch": "master", "commit": "12b1a1e095d968887a17ef791c2edb78d7595d46" },
|
"rainbow-delimiters.nvim": { "branch": "master", "commit": "12b1a1e095d968887a17ef791c2edb78d7595d46" },
|
||||||
|
"rest.nvim": { "branch": "main", "commit": "91badd46c60df6bd9800c809056af2d80d33da4c" },
|
||||||
"smart-splits.nvim": { "branch": "master", "commit": "66fda3a601a5b4c679656f15eb6ddd613c8d3216" },
|
"smart-splits.nvim": { "branch": "master", "commit": "66fda3a601a5b4c679656f15eb6ddd613c8d3216" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "f12b15e1b3a33524eb06a1ae7bc852fb1fd92197" },
|
"telescope.nvim": { "branch": "master", "commit": "f12b15e1b3a33524eb06a1ae7bc852fb1fd92197" },
|
||||||
"tiny-devicons-auto-colors.nvim": { "branch": "main", "commit": "f3f136fd82eded0bd1e1870cf7dfab7e8c36801e" },
|
"tiny-devicons-auto-colors.nvim": { "branch": "main", "commit": "f3f136fd82eded0bd1e1870cf7dfab7e8c36801e" },
|
||||||
|
|
|
@ -15,9 +15,10 @@
|
||||||
-- darcula-dark
|
-- darcula-dark
|
||||||
-- juliana
|
-- juliana
|
||||||
pcode.colorscheme = "darcula-dark"
|
pcode.colorscheme = "darcula-dark"
|
||||||
|
|
||||||
-- 0 =off 1= on
|
-- 0 =off 1= on
|
||||||
pcode.transparent_mode = 0
|
pcode.transparent_mode = 0
|
||||||
|
|
||||||
|
-- https://github.com/nvim-lualine/lualine.nvim
|
||||||
-- rounded
|
-- rounded
|
||||||
-- roundedall
|
-- roundedall
|
||||||
-- square
|
-- square
|
||||||
|
@ -30,7 +31,6 @@ pcode.lualinetheme = "roundedall"
|
||||||
-- 1 lualine lsp progress
|
-- 1 lualine lsp progress
|
||||||
-- 2 fidget progress
|
-- 2 fidget progress
|
||||||
pcode.progress = 1
|
pcode.progress = 1
|
||||||
|
|
||||||
-- 0 = on full text mode info,
|
-- 0 = on full text mode info,
|
||||||
-- 1 = on initial mode + logo
|
-- 1 = on initial mode + logo
|
||||||
-- 2 = logo only
|
-- 2 = logo only
|
||||||
|
@ -61,11 +61,6 @@ pcode.lspghost_text = false
|
||||||
pcode.mason_ensure_installed = { -- sebelumnya register_lsp
|
pcode.mason_ensure_installed = { -- sebelumnya register_lsp
|
||||||
-- "yamlls",
|
-- "yamlls",
|
||||||
-- "intelephense",
|
-- "intelephense",
|
||||||
-- "marksman",
|
|
||||||
-- "csharp_ls",
|
|
||||||
-- "clangd",
|
|
||||||
-- "dartls",
|
|
||||||
-- "kotlin_language_server",
|
|
||||||
-- tambahkan di bawah sini setelah melakukan :masoninstall
|
-- tambahkan di bawah sini setelah melakukan :masoninstall
|
||||||
}
|
}
|
||||||
pcode.unregister_lsp = {
|
pcode.unregister_lsp = {
|
||||||
|
@ -104,28 +99,39 @@ pcode.coderunner = {
|
||||||
html = "live-server $dir/$fileName",
|
html = "live-server $dir/$fileName",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- https://github.com/nvim-tree/nvim-tree.lua
|
||||||
-- 0 = normal
|
-- 0 = normal
|
||||||
-- 1 = float
|
-- 1 = float
|
||||||
pcode.nvimtree_isfloat = 0
|
pcode.nvimtree_isfloat = 0
|
||||||
|
|
||||||
|
-- https://github.com/roobert/tailwindcss-colorizer-cmp.nvim
|
||||||
pcode.tailwindcolorizer = false
|
pcode.tailwindcolorizer = false
|
||||||
|
|
||||||
-- https://github.com/Exafunction/codeium.vim
|
-- https://github.com/Exafunction/codeium.vim
|
||||||
pcode.codeium = false
|
pcode.codeium = false
|
||||||
|
|
||||||
-- https://github.com/Exafunction/codeium.nvim
|
-- https://github.com/Exafunction/codeium.nvim
|
||||||
pcode.codeium_nvim = true
|
pcode.codeium_nvim = true
|
||||||
|
|
||||||
-- https://github.com/kevinhwang91/nvim-ufo
|
-- https://github.com/kevinhwang91/nvim-ufo
|
||||||
pcode.nvimufo = false
|
pcode.nvimufo = false
|
||||||
|
|
||||||
-- https://github.com/echasnovski/mini.indentscope
|
-- https://github.com/echasnovski/mini.indentscope
|
||||||
pcode.indentscope = true
|
pcode.indentscope = true
|
||||||
|
|
||||||
-- https://github.com/echasnovski/mini.animate
|
-- https://github.com/echasnovski/mini.animate
|
||||||
pcode.minianimate = false
|
pcode.minianimate = false
|
||||||
|
|
||||||
|
-- https://github.com/hrsh7th/nvim-cmp
|
||||||
pcode.disable_cmpdoc = false
|
pcode.disable_cmpdoc = false
|
||||||
|
|
||||||
-- https://github.com/rachartier/tiny-devicons-auto-colors.nvim
|
-- https://github.com/rachartier/tiny-devicons-auto-colors.nvim
|
||||||
pcode.adaptive_color_icon = true
|
pcode.adaptive_color_icon = true
|
||||||
|
|
||||||
-- https://github.com/lukas-reineke/virt-column.nvim
|
-- https://github.com/lukas-reineke/virt-column.nvim
|
||||||
pcode.columnline = true
|
pcode.columnline = true
|
||||||
|
|
||||||
|
-- https://github.com/nvim-telescope/telescope.nvim
|
||||||
---@alias telescope_themes
|
---@alias telescope_themes
|
||||||
---| "cursor" # see `telescope.themes.get_cursor()`
|
---| "cursor" # see `telescope.themes.get_cursor()`
|
||||||
---| "dropdown" # see `telescope.themes.get_dropdown()`
|
---| "dropdown" # see `telescope.themes.get_dropdown()`
|
||||||
|
@ -133,6 +139,7 @@ pcode.columnline = true
|
||||||
---| "center" # retain the default telescope theme
|
---| "center" # retain the default telescope theme
|
||||||
pcode.telescope_theme_find_file = "center"
|
pcode.telescope_theme_find_file = "center"
|
||||||
pcode.telescope_theme_live_grep = "dropdown"
|
pcode.telescope_theme_live_grep = "dropdown"
|
||||||
|
|
||||||
-- https://github.com/kristijanhusak/vim-dadbod-ui
|
-- https://github.com/kristijanhusak/vim-dadbod-ui
|
||||||
pcode.database = false
|
pcode.database = false
|
||||||
|
|
||||||
|
@ -140,5 +147,9 @@ pcode.database = false
|
||||||
pcode.jest = false
|
pcode.jest = false
|
||||||
pcode.jest_command = "npm test -- "
|
pcode.jest_command = "npm test -- "
|
||||||
pcode.jest_config = "jest.config.mjs"
|
pcode.jest_config = "jest.config.mjs"
|
||||||
|
|
||||||
|
-- https://github.com/rest-nvim/rest.nvim
|
||||||
|
pcode.rest_client = true
|
||||||
|
|
||||||
-- https://github.com/ThePrimeagen/refactoring.nvim
|
-- https://github.com/ThePrimeagen/refactoring.nvim
|
||||||
pcode.refactoring = false
|
pcode.refactoring = false
|
||||||
|
|
28
lua/plugins/rest-nvim.lua
Normal file
28
lua/plugins/rest-nvim.lua
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
local map_opts = { silent = true, noremap = true }
|
||||||
|
local merge = function(tableA, tableB, ...)
|
||||||
|
return vim.tbl_deep_extend("force", tableA, tableB, ...)
|
||||||
|
end
|
||||||
|
local nmap = function(lhs, rhs, opts)
|
||||||
|
opts = opts or {}
|
||||||
|
vim.keymap.set("n", lhs, rhs, merge(map_opts, opts))
|
||||||
|
end
|
||||||
|
local M = {}
|
||||||
|
if pcode.rest_client then
|
||||||
|
M = {
|
||||||
|
"rest-nvim/rest.nvim",
|
||||||
|
-- NOTE: Follow https://github.com/rest-nvim/rest.nvim/issues/306
|
||||||
|
commit = "91badd46c60df6bd9800c809056af2d80d33da4c",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local rest_nvim = require("rest-nvim")
|
||||||
|
rest_nvim.setup()
|
||||||
|
|
||||||
|
nmap("<Leader>rh", rest_nvim.run, { desc = "Run http request under cursor" })
|
||||||
|
nmap("<Leader>rH", rest_nvim.last, { desc = "Run last http request" })
|
||||||
|
end,
|
||||||
|
ft = "http",
|
||||||
|
}
|
||||||
|
end
|
||||||
|
return M
|
|
@ -65,8 +65,52 @@ keymap("v", "<C-_>", "<esc><cmd>lua require('Comment.api').toggle.linewise(vim.f
|
||||||
keymap("v", "<C-/>", "<esc><cmd>lua require('Comment.api').toggle.linewise(vim.fn.visualmode())<cr>", opts)
|
keymap("v", "<C-/>", "<esc><cmd>lua require('Comment.api').toggle.linewise(vim.fn.visualmode())<cr>", opts)
|
||||||
keymap("i", "<C-_>", "<esc><cmd>lua require('Comment.api').toggle.linewise(vim.fn.visualmode())<cr>", opts)
|
keymap("i", "<C-_>", "<esc><cmd>lua require('Comment.api').toggle.linewise(vim.fn.visualmode())<cr>", opts)
|
||||||
keymap("i", "<C-/>", "<esc><cmd>lua require('Comment.api').toggle.linewise(vim.fn.visualmode())<cr>", opts)
|
keymap("i", "<C-/>", "<esc><cmd>lua require('Comment.api').toggle.linewise(vim.fn.visualmode())<cr>", opts)
|
||||||
|
keymap("i", "<C-_>", "<esc><cmd>lua require('Comment.api').toggle.linewise.current()<cr><right>i", opts)
|
||||||
|
keymap("i", "<C-/>", "<esc><cmd>lua require('Comment.api').toggle.linewise.current()<cr><right>i", opts)
|
||||||
|
|
||||||
|
-- case spesial file
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
pattern = { "javascript", "typescript" },
|
||||||
|
callback = function()
|
||||||
|
keymap(
|
||||||
|
"i",
|
||||||
|
"<C-_>",
|
||||||
|
"<esc><cmd>lua require('Comment.api').toggle.linewise.current()<cr>i<right><right><Space>",
|
||||||
|
opts
|
||||||
|
)
|
||||||
|
keymap(
|
||||||
|
"i",
|
||||||
|
"<C-/>",
|
||||||
|
"<esc><cmd>lua require('Comment.api').toggle.linewise.current()<cr>i<right><right><Space>",
|
||||||
|
opts
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
pattern = { "lua", "html", "javascriptreact" },
|
||||||
|
callback = function()
|
||||||
|
keymap(
|
||||||
|
"i",
|
||||||
|
"<C-_>",
|
||||||
|
"<esc><cmd>lua require('Comment.api').toggle.linewise.current()<cr><right>i<right><right><right><Space>",
|
||||||
|
opts
|
||||||
|
)
|
||||||
|
keymap(
|
||||||
|
"i",
|
||||||
|
"<C-/>",
|
||||||
|
"<esc><cmd>lua require('Comment.api').toggle.linewise.current()<cr><right>i<right><right><right><Space>",
|
||||||
|
opts
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
pattern = { "javascriptreact" },
|
||||||
|
callback = function()
|
||||||
keymap("i", "<C-_>", "<esc><cmd>lua require('Comment.api').toggle.linewise.current()<cr>i", opts)
|
keymap("i", "<C-_>", "<esc><cmd>lua require('Comment.api').toggle.linewise.current()<cr>i", opts)
|
||||||
keymap("i", "<C-/>", "<esc><cmd>lua require('Comment.api').toggle.linewise.current()<cr>i", opts)
|
keymap("i", "<C-/>", "<esc><cmd>lua require('Comment.api').toggle.linewise.current()<cr>i", opts)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
keymap("n", "<C-_>", "<esc><cmd>lua require('Comment.api').toggle.linewise.current()<cr>i", opts)
|
keymap("n", "<C-_>", "<esc><cmd>lua require('Comment.api').toggle.linewise.current()<cr>i", opts)
|
||||||
keymap("n", "<C-/>", "<esc><cmd>lua require('Comment.api').toggle.linewise.current()<cr>i", opts)
|
keymap("n", "<C-/>", "<esc><cmd>lua require('Comment.api').toggle.linewise.current()<cr>i", opts)
|
||||||
-- keymap("n", "<C-l>", "<esc><cmd>lua _LIVE_SERVER()<cr>", opts)
|
-- keymap("n", "<C-l>", "<esc><cmd>lua _LIVE_SERVER()<cr>", opts)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue