keymaps lsp

main
Mathias Rothenhaeusler 2024-03-27 11:56:49 +01:00
parent b8776f785e
commit e438717557
1 changed files with 11 additions and 9 deletions

View File

@ -64,12 +64,14 @@ local on_attach = function(_, bufnr)
keymap.set("n", "gr", "<cmd>Lspsaga finder<CR>", opts) -- see definition and make edits in window keymap.set("n", "gr", "<cmd>Lspsaga finder<CR>", opts) -- see definition and make edits in window
keymap.set("n", "<leader>rn", "<cmd>Lspsaga rename<CR>", opts) -- smart rename keymap.set("n", "<leader>rn", "<cmd>Lspsaga rename<CR>", opts) -- smart rename
keymap.set("n", "<leader>ca", "<cmd>Lspsaga code_action<CR>", opts) -- see available code actions keymap.set("n", "<leader>ca", "<cmd>Lspsaga code_action<CR>", opts) -- see available code actions
keymap.set("n", "<leader>en", "<cmd>Lspsaga diagnostic_jump_next<CR>") -- jump to next diagnostic in buffer
keymap.set("n", "K", "<cmd>Lspsaga hover_doc<CR>", opts) -- show documentation for what is under cursor keymap.set("n", "K", "<cmd>Lspsaga hover_doc<CR>", opts) -- show documentation for what is under cursor
keymap.set("n", "<leader>eb", "<cmd>Lspsaga diagnostic_jump_prev<CR>") -- jump to previous diagnostic in buffer
keymap.set("n", "ge", "<cmd>Lspsaga show_line_diagnostics<CR>", opts) -- show diagnostics for line keymap.set("n", "ge", "<cmd>Lspsaga show_line_diagnostics<CR>", opts) -- show diagnostics for line
keymap.set("n", "<leader>d", "<cmd>Lspsaga show_buf_diagnostics<CR>")
keymap.set("n", "<a-cr>", "<cmd>Lspsaga code_action<CR>", opts) keymap.set("n", "<a-cr>", "<cmd>Lspsaga code_action<CR>", opts)
-- diagnostic
keymap.set("n", "<leader>d", "<cmd>Lspsaga show_buf_diagnostics<CR>")
keymap.set("n", "<leader>dn", "<cmd>Lspsaga diagnostic_jump_next<CR>") -- jump to next diagnostic in buffer
keymap.set("n", "<leader>db", "<cmd>Lspsaga diagnostic_jump_prev<CR>") -- jump to previous diagnostic in buffer
keymap.set("n", "gj", "]m", opts) -- jump to next method keymap.set("n", "gj", "]m", opts) -- jump to next method
keymap.set("n", "gk", "[m", opts) -- jump to previous method keymap.set("n", "gk", "[m", opts) -- jump to previous method
end end