feat(nvim): improve/add keybinds
This commit is contained in:
parent
d1159b1ea9
commit
66652a650c
4 changed files with 78 additions and 25 deletions
|
|
@ -175,8 +175,6 @@ local on_attach_def = function(_, bufnr)
|
|||
l = {
|
||||
name = "lsp",
|
||||
d = { "<cmd>Lspsaga show_cursor_diagnostics<cr>", "open diagnostic window" },
|
||||
n = { "<cmd>Lspsaga diagnostic_jump_next<CR>", "next error" },
|
||||
p = { "<cmd>Lspsaga diagnostic_jump_prev<CR>", "prev error" },
|
||||
c = { "<cmd>Lspsaga code_action<cr>", "code action" },
|
||||
r = { "<cmd>Lspsaga rename<cr>", "rename" },
|
||||
i = { "<cmd>Lspsaga hover_doc ++keep<cr>", "show info (sticky)" },
|
||||
|
|
@ -188,17 +186,6 @@ local on_attach_def = function(_, bufnr)
|
|||
mode = { "n", "v" },
|
||||
},
|
||||
},
|
||||
w = {
|
||||
name = "workspace",
|
||||
a = { vim.lsp.buf.add_workspace_folder, "add workspace folder" },
|
||||
r = { vim.lsp.buf.remove_workspace_folder, "remove workspace folder" },
|
||||
l = {
|
||||
function()
|
||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||
end,
|
||||
"list workspace folders",
|
||||
},
|
||||
},
|
||||
t = {
|
||||
name = "toggle",
|
||||
l = { lsp_lines.toggle, "lsp lines" },
|
||||
|
|
@ -206,9 +193,18 @@ local on_attach_def = function(_, bufnr)
|
|||
},
|
||||
g = {
|
||||
name = "goto",
|
||||
d = { "<cmd>Lspsaga peek_definition<cr>", "definition" },
|
||||
t = { "<cmd>Lspsaga peek_type_definition<cr>", "type defininition" },
|
||||
h = { "<cmd>Lspsaga lsp_finder<CR>", "lsp finder" },
|
||||
d = { "<cmd>Lspsaga peek_definition<cr>", "Goto definition" },
|
||||
t = { "<cmd>Lspsaga peek_type_definition<cr>", "Goto type defininition" },
|
||||
h = { "<cmd>Lspsaga lsp_finder<CR>", "Lsp finder" },
|
||||
r = { "<cmd>Telescope lsp_references<cr>", "Goto reference" },
|
||||
D = { vim.lsp.buf.declaration, "Goto declaration" },
|
||||
I = { "<cmd>Telescope lsp_implementations<cr>", "Goto implementation" },
|
||||
},
|
||||
["["] = {
|
||||
d = { "<cmd>Lspsaga diagnostic_jump_prev<cr>", "Previous diagnostic" },
|
||||
},
|
||||
["]"] = {
|
||||
d = { "<cmd>Lspsaga diagnostic_jump_next<cr>", "Next diagnostic" },
|
||||
},
|
||||
}, { buffer = bufnr, silent = true })
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue