remap code action menu to <leader>ca

This commit is contained in:
Vladan Popovic 2024-01-03 01:28:54 +01:00
parent 062d618a21
commit 1ecaa1dcf8

View file

@ -6,12 +6,11 @@ local on_attach = function(client, bufnr)
-- Mappings.
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", "[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-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
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>")