From 7a3aa50d7fb712eb17a68b8c6626c65be80e4d48 Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Fri, 17 Apr 2026 10:53:54 +0100 Subject: refactor: audit and fix neovim keybinds - fix visual p register clobbering: use "_dP black-hole pattern - remove ; -> : mapping: restore native repeat-find motion - remove / -> ^/$ emacs mappings: anti-vim-philosophy - map dial.nvim to //g/g (standard increment keys) - remove redundant oq diagnostic loclist (covered by tl) - collapse {,v,x,t}D type-def onto g{v,x,t}t pattern (0.12 grt) - move oc/ic calls to co/ci (Code group) - add gvr/gxr/gtr for references in splits - remove empty s and d which-key group declarations --- home/.config/nvim/lua/plugins/lsp.lua | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'home/.config/nvim/lua/plugins/lsp.lua') diff --git a/home/.config/nvim/lua/plugins/lsp.lua b/home/.config/nvim/lua/plugins/lsp.lua index 2e334c8..ddd5bea 100644 --- a/home/.config/nvim/lua/plugins/lsp.lua +++ b/home/.config/nvim/lua/plugins/lsp.lua @@ -88,16 +88,15 @@ vim.api.nvim_create_autocmd("LspAttach", { nmap("gtd", function() fzf.lsp_definitions({ jump1_action = fzf.actions.file_tabedit }) end, "[G]oto in a [T]ab to [D]efinition") - nmap("D", fzf.lsp_typedefs, "Type [D]efinition") - nmap("vD", function() + nmap("gvt", function() fzf.lsp_typedefs({ jump1_action = fzf.actions.file_vsplit }) - end, "Open in a [V]ertical split Type [D]efinition") - nmap("xD", function() + end, "[G]oto in a [V]ertical split to [T]ype definition") + nmap("gxt", function() fzf.lsp_typedefs({ jump1_action = fzf.actions.file_split }) - end, "Open in a [X]horizontal split Type [D]efinition") - nmap("tD", function() + end, "[G]oto in a [X]horizontal split to [T]ype definition") + nmap("gtt", function() fzf.lsp_typedefs({ jump1_action = fzf.actions.file_tabedit }) - end, "Open in a [T]ab Type [D]efinition") + end, "[G]oto in a [T]ab to [T]ype definition") nmap("gri", fzf.lsp_implementations, "[G]oto [I]mplementation") nmap("grvi", function() fzf.lsp_implementations({ jump1_action = fzf.actions.file_vsplit }) @@ -109,8 +108,17 @@ vim.api.nvim_create_autocmd("LspAttach", { fzf.lsp_implementations({ jump1_action = fzf.actions.file_tabedit }) end, "[G]oto in a [T]ab to [I]mplementation") nmap("grr", fzf.lsp_references, "[G]oto [R]eferences") - nmap("ic", fzf.lsp_incoming_calls, "[I]ncoming [C]alls") - nmap("oc", fzf.lsp_outgoing_calls, "[O]utgoing [C]alls") + nmap("gvr", function() + fzf.lsp_references({ jump1_action = fzf.actions.file_vsplit }) + end, "[G]oto in a [V]ertical split to [R]eferences") + nmap("gxr", function() + fzf.lsp_references({ jump1_action = fzf.actions.file_split }) + end, "[G]oto in a [X]horizontal split to [R]eferences") + nmap("gtr", function() + fzf.lsp_references({ jump1_action = fzf.actions.file_tabedit }) + end, "[G]oto in a [T]ab to [R]eferences") + nmap("ci", fzf.lsp_incoming_calls, "[C]ode [I]ncoming calls") + nmap("co", fzf.lsp_outgoing_calls, "[C]ode [O]utgoing calls") nmap("gO", fzf.lsp_document_symbols, "d[O]ocument symbols") nmap( "ws", -- cgit v1.2.3-70-g09d2