map return and shift return to jump lsp definitions
This commit is contained in:
parent
000a7051f1
commit
ea7760b0ff
@ -85,17 +85,6 @@ local on_attach = function(client, bufnr)
|
||||
|
||||
lspKeys(client, bufnr)
|
||||
|
||||
if client.server_capabilities.documentHighlightProvider then
|
||||
vim.keymap.set(
|
||||
'n',
|
||||
'<return>',
|
||||
function ()
|
||||
vim.lsp.buf.clear_references()
|
||||
vim.lsp.buf.document_highlight()
|
||||
end,
|
||||
vim.tbl_extend('error', { noremap = true, silent = false, buffer = bufnr }, { desc = 'Document highlight' })
|
||||
)
|
||||
end
|
||||
if client.server_capabilities.documentSymbolProvider then
|
||||
local navic = require('nvim-navic')
|
||||
navic.attach(client, bufnr)
|
||||
|
@ -36,5 +36,21 @@ return {
|
||||
end,
|
||||
desc = 'Lazygit Log (cwd)',
|
||||
},
|
||||
{
|
||||
'<return>',
|
||||
function()
|
||||
Snacks.words.jump(vim.v.count1)
|
||||
end,
|
||||
desc = 'Next Reference',
|
||||
mode = { 'n' },
|
||||
},
|
||||
{
|
||||
'<S-CR>',
|
||||
function()
|
||||
Snacks.words.jump(-vim.v.count1)
|
||||
end,
|
||||
desc = 'Prev Reference',
|
||||
mode = { 'n' },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user