refine lsp bindings

This commit is contained in:
thomasabishop 2024-12-06 07:28:17 +00:00
parent 812cd77d9e
commit d0525f25a8

View file

@ -5,11 +5,14 @@ return {
"nvim-tree/nvim-web-devicons", -- optional "nvim-tree/nvim-web-devicons", -- optional
}, },
keys = { keys = {
--{ "<leader>ss", "<cmd>Lspsaga diagnostic_jump_next<CR>" },
{ "<leader>gf", "<cmd>Lspsaga lsp_finder<CR>" }, { "<leader>K", "<cmd>Lspsaga hover_doc<CR>" },
{ "<leader>gd", "<cmd>Lspsaga peek_definition<CR>" },
{ "<leader>rn", "<cmd>Lspsaga rename<CR>" },
{ "<leader>y", "<cmd>Lspsaga finder<CR>" }, { "<leader>y", "<cmd>Lspsaga finder<CR>" },
{ "<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" },
}, },
config = function() config = function()
require("lspsaga").setup({ require("lspsaga").setup({
@ -17,14 +20,31 @@ return {
definition = { definition = {
edit = "<CR>", edit = "<CR>",
}, },
ui = { finder = {
colors = { keys = {
-- normal_bg = "#022746", -- toggle_or_jump = "<Tab>",
}, quit = { "q", "<ESC>" },
code_action = { vsplit = "v",
enable = false, split = "s",
}, },
}, },
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,
},
}) })
end, end,
} }