Add action menu for generic lsp
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "659c4479529a05cc9b05ef762639a09d366cc690" },
|
||||
"NvChad": { "branch": "v2.5", "commit": "bbc3d43db088c141b142a40cd5f717635833a54e" },
|
||||
"actions-preview.nvim": { "branch": "master", "commit": "9f52a01c374318e91337697ebed51c6fae57f8a4" },
|
||||
"auto-save.nvim": { "branch": "main", "commit": "979b6c82f60cfa80f4cf437d77446d0ded0addf0" },
|
||||
"base46": { "branch": "v2.5", "commit": "16ee0e93dfc52e35ee7c9cf45e5ebf116958edb7" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
|
||||
@@ -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" })
|
||||
|
||||
20
nvim/lua/plugins/action-preview.lua
Normal file
20
nvim/lua/plugins/action-preview.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
return {
|
||||
"aznhe21/actions-preview.nvim",
|
||||
opts = {
|
||||
backend = { "telescope", "nui" },
|
||||
telescope = vim.tbl_extend(
|
||||
"force",
|
||||
-- telescope theme: https://github.com/nvim-telescope/telescope.nvim#themes
|
||||
require("telescope.themes").get_cursor(),
|
||||
{
|
||||
make_value = nil,
|
||||
make_make_display = nil,
|
||||
previewer = false,
|
||||
layout_config = {
|
||||
width = 0.2,
|
||||
height = 0.1,
|
||||
},
|
||||
}
|
||||
),
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user