local keymap = vim.keymap.set -- LSP finder - Find the symbol's definition -- If there is no definition, it will instead be hidden -- When you use an action in finder like "open vsplit", -- you can use to jump back keymap("n", "gh", "Lspsaga lsp_finder") -- Code action keymap({"n","v"}, "ca", "Lspsaga code_action") -- Rename all occurrences of the hovered word for the entire file keymap("n", "gr", "Lspsaga rename") -- Rename all occurrences of the hovered word for the selected files keymap("n", "gr", "Lspsaga rename ++project") -- Peek definition -- You can edit the file containing the definition in the floating window -- It also supports open/vsplit/etc operations, do refer to "definition_action_keys" -- It also supports tagstack -- Use to jump back keymap("n", "gp", "Lspsaga peek_definition") -- Go to definition keymap("n", "gd", "Lspsaga goto_definition") -- Diagnostic jump -- You can use to jump back to your previous location keymap("n", "[e", "Lspsaga diagnostic_jump_prev") keymap("n", "]e", "Lspsaga diagnostic_jump_next") -- Diagnostic jump with filters such as only jumping to an error keymap("n", "[E", function() require("lspsaga.diagnostic"):goto_prev({ severity = vim.diagnostic.severity.ERROR }) end) keymap("n", "]E", function() require("lspsaga.diagnostic"):goto_next({ severity = vim.diagnostic.severity.ERROR }) end) -- Toggle outline keymap("n","o", "Lspsaga outline") -- Hover Doc -- If there is no hover doc, -- there will be a notification stating that -- there is no information available. -- To disable it just use ":Lspsaga hover_doc ++quiet" -- Pressing the key twice will enter the hover window keymap("n", "K", "Lspsaga hover_doc") -- If you want to keep the hover window in the top right hand corner, -- you can pass the ++keep argument -- Note that if you use hover with ++keep, pressing this key again will -- close the hover window. If you want to jump to the hover window -- you should use the wincmd command "w" keymap("n", "K", "Lspsaga hover_doc ++keep") -- Call hierarchy keymap("n", "ci", "Lspsaga incoming_calls") keymap("n", "co", "Lspsaga outgoing_calls") -- Floating terminal keymap({"n", "t"}, "", "Lspsaga term_toggle")