diff --git a/nvim/.config/nvim/lua/lsp.lua b/nvim/.config/nvim/lua/lsp.lua index 517ce75..46cc750 100644 --- a/nvim/.config/nvim/lua/lsp.lua +++ b/nvim/.config/nvim/lua/lsp.lua @@ -53,29 +53,18 @@ protocol.CompletionItemKind = { local lsp_augroup_id = vim.api.nvim_create_augroup("LSP", { clear = true }) local lsp_key_mappings = { - { "textDocument/definition" , 'n', 'pd' , 'lua PeekDefinition()' }, - { "textDocument/definition" , 'n', 'gd' , 'lua vim.lsp.buf.definition()' }, ---{ "textDocument/declaration" , 'n', 'gD' , 'lua vim.lsp.buf.declaration()' }, - { "textDocument/typeDefinition" , 'n', '' , 'lua vim.lsp.buf.type_definition()' }, - { "textDocument/implementation" , 'n', 'gD' , 'lua vim.lsp.buf.implementation()' }, - { "textDocument/documentSymbol" , 'n', '1gd' , 'lua vim.lsp.buf.document_symbol()' }, - { "workspace/symbol" , 'n', '1gD' , 'lua vim.lsp.buf.workspace_symbol()' }, - { "textDocument/signatureHelp" , 'n', 'S', 'lua vim.lsp.buf.signature_help()' }, - { "textDocument/rename" , 'n', 'gR' , 'lua vim.lsp.buf.rename()' }, - { "textDocument/inlayHint" , 'n', 'gi' , 'lua InlayHintToggle()' }, - - { "textDocument/rangeFormatting", 'x', 'gq', 'lua vim.lsp.buf.format({async=true})' }, - { "textDocument/formatting" , 'n', 'gq', 'lua vim.lsp.buf.format({async=true})' }, - - { "textDocument/codeAction", 'n', 'ga' , 'lua vim.lsp.buf.code_action()' }, - { "textDocument/codeAction", 'v', 'ga' , 'lua vim.lsp.buf.code_action()' }, - { "textDocument/codeAction", 'n', 'r', 'lua vim.lsp.buf.code_action{only = \'refactor\' }' }, - { "textDocument/codeAction", 'v', 'r', 'lua vim.lsp.buf.code_action{only = \'refactor\' }' }, + { "textDocument/definition" , 'n', 'pd' , 'lua PeekDefinition()' }, + { "textDocument/inlayHint" , 'n', 'gi' , 'lua InlayHintToggle()' }, + { "textDocument/definition" , 'n', 'gd' , 'lua vim.lsp.buf.definition()' }, +--{ "textDocument/declaration" , 'n', 'gD' , 'lua vim.lsp.buf.declaration()' }, + { "textDocument/typeDefinition" , 'n', '', 'lua vim.lsp.buf.type_definition()' }, + { "textDocument/implementation" , 'n', 'gD' , 'lua vim.lsp.buf.implementation()' }, + { "textDocument/documentSymbol" , 'n', '1gd' , 'lua vim.lsp.buf.document_symbol()' }, + { "workspace/symbol" , 'n', '1gD' , 'lua vim.lsp.buf.workspace_symbol()' }, + { "textDocument/formatting" , 'n', 'gf' , 'lua vim.lsp.buf.format({async=true})' }, { "textDocument/codeLens", 'n', 'l', 'lua vim.lsp.codelens.run()' }, { "textDocument/codeLens", 'n', 'L', 'lua vim.lsp.codelens.clear()' }, - - { "textDocument/references", 'n', 'gr', 'lua vim.lsp.buf.references({ includeDeclaration = false })'}, } local CODE_ACTION_AVAILABLE = "CodeActionAvailable"