mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2024-12-22 17:57:34 +00:00
Undo swapped_map grouping
This commit is contained in:
parent
5a81e7d33c
commit
aef826f76b
@ -74,22 +74,21 @@ local function get_default_attach(override_capabilities)
|
|||||||
|
|
||||||
-- Mappings
|
-- Mappings
|
||||||
local opts = { noremap = true, silent = true }
|
local opts = { noremap = true, silent = true }
|
||||||
local lsp_keymap = utils.swapped_map(utils.keymap_group("n", "<leader>l", opts, bufnr), function(lsp_keymap)
|
local lsp_keymap = utils.keymap_group("n", "<leader>l", opts, bufnr)
|
||||||
lsp_keymap("h", "<cmd>lua vim.lsp.buf.hover()<CR>")
|
lsp_keymap("h", "<cmd>lua vim.lsp.buf.hover()<CR>")
|
||||||
lsp_keymap("rn", "<cmd>lua vim.lsp.buf.rename()<CR>")
|
lsp_keymap("rn", "<cmd>lua vim.lsp.buf.rename()<CR>")
|
||||||
lsp_keymap("e", "<cmd>lua vim.lsp.diagnostics.show_line_diagnostics()<CR>")
|
lsp_keymap("e", "<cmd>lua vim.lsp.diagnostics.show_line_diagnostics()<CR>")
|
||||||
lsp_keymap("D", "<cmd>lua vim.lsp.buf.declaration()<CR>")
|
lsp_keymap("D", "<cmd>lua vim.lsp.buf.declaration()<CR>")
|
||||||
lsp_keymap("d", "<cmd>lua vim.lsp.buf.definition()<CR>")
|
lsp_keymap("d", "<cmd>lua vim.lsp.buf.definition()<CR>")
|
||||||
lsp_keymap("t", "<cmd>lua vim.lsp.buf.type_definition()<CR>")
|
lsp_keymap("t", "<cmd>lua vim.lsp.buf.type_definition()<CR>")
|
||||||
lsp_keymap("i", "<cmd>lua vim.lsp.buf.implementation()<CR>")
|
lsp_keymap("i", "<cmd>lua vim.lsp.buf.implementation()<CR>")
|
||||||
lsp_keymap("s", "<cmd>lua vim.lsp.buf.signature_help()<CR>")
|
lsp_keymap("s", "<cmd>lua vim.lsp.buf.signature_help()<CR>")
|
||||||
lsp_keymap("wa", "<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>", opts)
|
lsp_keymap("wa", "<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>", opts)
|
||||||
lsp_keymap("wr", "<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>", opts)
|
lsp_keymap("wr", "<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>", opts)
|
||||||
lsp_keymap("wl", "<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>", opts)
|
lsp_keymap("wl", "<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>", opts)
|
||||||
lsp_keymap("r", "<cmd>lua vim.lsp.buf.references()<CR>", opts)
|
lsp_keymap("r", "<cmd>lua vim.lsp.buf.references()<CR>", opts)
|
||||||
lsp_keymap("p", "<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>", opts)
|
lsp_keymap("p", "<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>", opts)
|
||||||
lsp_keymap("n", "<cmd>lua vim.lsp.diagnostic.goto_next()<CR>", opts)
|
lsp_keymap("n", "<cmd>lua vim.lsp.diagnostic.goto_next()<CR>", opts)
|
||||||
end)
|
|
||||||
|
|
||||||
-- Older keymaps
|
-- Older keymaps
|
||||||
buf_set_keymap("n", "gD", "<Cmd>lua vim.lsp.buf.declaration()<CR>", opts)
|
buf_set_keymap("n", "gD", "<Cmd>lua vim.lsp.buf.declaration()<CR>", opts)
|
||||||
|
Loading…
Reference in New Issue
Block a user