Add action menu for generic lsp

This commit is contained in:
2024-11-15 10:36:22 +01:00
parent 7947e0a0d2
commit 7076a05bac
3 changed files with 22 additions and 1 deletions

View File

@@ -32,7 +32,7 @@ map(
"<CMD> lua require('conform').format { lsp_fallback = true }<CR>",
{ desc = "General Format file" }
)
map({ "n", "v" }, "<leader>la", vim.lsp.buf.code_action, { desc = "Code action" })
map({ "n", "v" }, "<leader>la", require("actions-preview").code_actions, { desc = "Code action" })
map("n", "gD", vim.lsp.buf.declaration, { desc = "Go to declaration" })
map("n", "gd", vim.lsp.buf.definition, { desc = "Go to definition" })
map("n", "gi", vim.lsp.buf.implementation, { desc = "Go to implementation" })