dotfiles/nvim/lua/plugins/lspsaga.lua

51 lines
1.2 KiB
Lua
Raw Normal View History

2024-10-27 16:21:40 +00:00
return {
"nvimdev/lspsaga.nvim",
dependencies = {
"nvim-treesitter/nvim-treesitter", -- optional
"nvim-tree/nvim-web-devicons", -- optional
},
keys = {
2024-12-06 07:28:17 +00:00
{ "<leader>K", "<cmd>Lspsaga hover_doc<CR>" },
2024-12-05 07:28:20 +00:00
{ "<leader>y", "<cmd>Lspsaga finder<CR>" },
2024-12-06 07:28:17 +00:00
{ "<leader>g", "<cmd>Lspsaga peek_definition<CR>" },
{ "<leader>gf", "<cmd>Lspsaga goto_definition<CR>", desc = "Go to definition" },
{ "<leader>rn", "<cmd>Lspsaga rename<CR>" },
{ "<leader>b", "<cmd>Lspsaga code_action<CR>", desc = "Code actions" },
{ "<leader>r", "<cmd>Lspsaga show_line_diagnostics<CR>", desc = "Show line diagnostics" },
2024-10-27 16:21:40 +00:00
},
config = function()
require("lspsaga").setup({
scroll_preview = { scroll_down = "<C-f>", scroll_up = "<C-b>" },
definition = {
edit = "<CR>",
},
2024-12-06 07:28:17 +00:00
finder = {
keys = {
-- toggle_or_jump = "<Tab>",
quit = { "q", "<ESC>" },
vsplit = "v",
split = "s",
2024-10-27 16:21:40 +00:00
},
},
2024-12-06 07:28:17 +00:00
lightbulb = {
enable = true,
sign = true,
virtual_text = true,
sign_priority = 40,
},
hover = {
max_width = 0.6,
max_height = 0.4,
},
diagnostic = {
show_code_action = true,
show_source = true,
jump_num_shortcut = true,
max_width = 0.7,
max_height = 0.6,
},
2024-10-27 16:21:40 +00:00
})
end,
}