remap code actions to either <leader>c or <leader>a

This commit is contained in:
Vladan Popovic 2023-12-18 14:29:25 +01:00
parent 15bc48a6c5
commit 253d536ba4

View file

@ -14,7 +14,8 @@ local on_attach = function(client, bufnr)
utils.map("n", "]d", "<cmd>lua vim.diagnostic.goto_next()<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", "<leader>a", "<cmd>lua vim.lsp.buf.code_action()<CR>")
utils.map("n", "<leader>c", "<cmd>lua vim.lsp.buf.code_action()<CR>")
utils.map("n", "<M-r>", "<cmd>lua vim.lsp.buf.rename()()<CR>")
utils.map("n", "<M-t>", "<cmd>lua vim.lsp.buf.type_definition()<CR>")