remap code action menu to <leader>ca
This commit is contained in:
parent
062d618a21
commit
1ecaa1dcf8
1 changed files with 2 additions and 3 deletions
|
@ -6,12 +6,11 @@ local on_attach = function(client, bufnr)
|
||||||
-- Mappings.
|
-- Mappings.
|
||||||
utils.map("n", "K", "<Cmd>lua vim.lsp.buf.hover()<CR>")
|
utils.map("n", "K", "<Cmd>lua vim.lsp.buf.hover()<CR>")
|
||||||
utils.map("n", "<C-k>", "<cmd>lua vim.lsp.buf.signature_help()<CR>")
|
utils.map("n", "<C-k>", "<cmd>lua vim.lsp.buf.signature_help()<CR>")
|
||||||
utils.map("n", "[l", "<cmd>lua vim.diagnostic.show_line_diagnostics()<CR>")
|
|
||||||
utils.map("n", "]l", "<cmd>lua vim.diagnostic.set_loclist()<CR>")
|
|
||||||
utils.map("n", "<leader>ca", "<cmd>lua vim.lsp.buf.code_action()<CR>")
|
|
||||||
utils.map("n", "<M-k>", "<cmd>lua vim.lsp.buf.type_definition()<CR>")
|
utils.map("n", "<M-k>", "<cmd>lua vim.lsp.buf.type_definition()<CR>")
|
||||||
utils.map("n", "<M-r>", "<cmd>lua vim.lsp.buf.rename()()<CR>")
|
utils.map("n", "<M-r>", "<cmd>lua vim.lsp.buf.rename()()<CR>")
|
||||||
|
|
||||||
|
utils.map("n", "<leader>ca", "<cmd>lua vim.lsp.buf.code_action()<CR>")
|
||||||
|
|
||||||
-- list/add/remove workspace folders, not that I use them often
|
-- list/add/remove workspace folders, not that I use them often
|
||||||
utils.map("n", "<leader>wl", "<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>")
|
utils.map("n", "<leader>wl", "<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>")
|
||||||
utils.map("n", "<leader>wa", "<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>")
|
utils.map("n", "<leader>wa", "<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>")
|
||||||
|
|
Loading…
Reference in a new issue