nvim: lsp: Do not include declaration in reference lookups

This commit is contained in:
Sanchayan Maity 2023-11-27 17:15:32 +05:30
parent a88696db6b
commit e18c14b0e6
Signed by: sanchayanmaity
GPG key ID: 6F6A0609C12038F3

View file

@ -57,7 +57,6 @@ local lsp_key_mappings = {
{ "textDocument/definition" , 'n', 'gd' , '<cmd>lua vim.lsp.buf.definition()<CR>' },
--{ "textDocument/declaration" , 'n', 'gD' , '<cmd>lua vim.lsp.buf.declaration()<CR>' },
{ "textDocument/typeDefinition" , 'n', '<C-k>' , '<cmd>lua vim.lsp.buf.type_definition()<CR>' },
{ "textDocument/references" , 'n', 'gr' , '<cmd>lua vim.lsp.buf.references()<CR>' },
{ "textDocument/implementation" , 'n', 'gD' , '<cmd>lua vim.lsp.buf.implementation()<CR>' },
{ "textDocument/documentSymbol" , 'n', '1gd' , '<cmd>lua vim.lsp.buf.document_symbol()<CR>' },
{ "workspace/symbol" , 'n', '1gD' , '<cmd>lua vim.lsp.buf.workspace_symbol()<CR>' },
@ -75,6 +74,8 @@ local lsp_key_mappings = {
{ "textDocument/codeLens", 'n', '<LocalLeader>l', '<cmd>lua vim.lsp.codelens.run()<CR>' },
{ "textDocument/codeLens", 'n', '<LocalLeader>L', '<cmd>lua vim.lsp.codelens.clear()<CR>' },
{ "textDocument/references", 'n', 'gr', '<cmd>lua vim.lsp.buf.references({ includeDeclaration = false })<CR>'},
}
local CODE_ACTION_AVAILABLE = "CodeActionAvailable"