lsp: code actions with <leader>a

This commit is contained in:
kalmenn 2024-01-09 10:02:41 +01:00
parent 9efb96a501
commit 4977a7c1f0
Signed by: kalmenn
GPG key ID: F500055C44BC3834

View file

@ -35,6 +35,7 @@ return {
print(vim.inspect(vim.lsp.buf.list_workspace_folders())) print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, opts) end, opts)
vim.keymap.set("n", "<space>D", vim.lsp.buf.type_definition, opts) vim.keymap.set("n", "<space>D", vim.lsp.buf.type_definition, opts)
vim.keymap.set("n", "<space>a", vim.lsp.buf.code_action, opts)
vim.keymap.set("n", "<space>rn", vim.lsp.buf.rename, opts) vim.keymap.set("n", "<space>rn", vim.lsp.buf.rename, opts)
vim.keymap.set({ "n", "v" }, "<space>ca", vim.lsp.buf.code_action, opts) vim.keymap.set({ "n", "v" }, "<space>ca", vim.lsp.buf.code_action, opts)
vim.keymap.set("n", "gr", vim.lsp.buf.references, opts) vim.keymap.set("n", "gr", vim.lsp.buf.references, opts)