From affe966de6580ab296cd8cbe9b6342a1c1d2b202 Mon Sep 17 00:00:00 2001 From: He4eT Date: Sun, 24 Aug 2025 00:26:36 +0200 Subject: [PATCH] nvim: remove obsolete fixes --- nvim/init.lua | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/nvim/init.lua b/nvim/init.lua index 440a400..f6061b5 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -405,8 +405,8 @@ require('lazy').setup({ vim.keymap.set({ 'n' }, ':', fzf.command_history, { desc = '[F]zf: command history' }) -- LSP + vim.keymap.set({ 'n' }, 'gd', fzf.lsp_definitions, { desc = 'LSP: [G]oto [d]efinition list' }) vim.keymap.set({ 'n' }, 'gr', fzf.lsp_references, { desc = 'LSP: [G]o to fzf [R]eference list' }) - vim.keymap.set({ 'n' }, 'gd', fzf.lsp_definitions, { desc = 'LSP: [G]oto [d]efinition list' }) vim.keymap.set({ 'n' }, 'fu', fzf_grep_filename, { desc = '[F]zf: current file [U]sages' }) end, }, @@ -447,19 +447,6 @@ require('lazy').setup({ }, }, }, - handlers = { - -- Usually gets called after another code action - -- https://github.com/jose-elias-alvarez/typescript.nvim/issues/17 - ['_typescript.rename'] = function(_, result) - return result - end, - -- 'Go to definition' workaround - -- https://github.com/holoiii/nvim/commit/73a4db74fe463f5064346ba63870557fedd134ad - ['textDocument/definition'] = function(err, result, ...) - result = vim.islist(result) and result[1] or result - vim.lsp.handlers['textDocument/definition'](err, result, ...) - end, - }, }, --[[ cfg_lazy_lsp_servers_volar ]] volar = {}, @@ -482,9 +469,9 @@ require('lazy').setup({ nmap('rn', vim.lsp.buf.rename, '[R]e[n]ame') nmap('ca', vim.lsp.buf.code_action, '[C]ode [A]tion') - nmap('gd', vim.lsp.buf.definition, '[G]oto [d]efinition') nmap('gD', vim.lsp.buf.type_definition, '[G]oto type [D]efinition') nmap('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') + nmap('gd', vim.lsp.buf.definition, '[G]oto [d]efinition') nmap('ea', vim.lsp.buf.add_workspace_folder, 'Workspac[e] [A]dd Folder') nmap('er', vim.lsp.buf.remove_workspace_folder, 'Workspac[e] [R]emove Folder')