From f68241dafbfe38d6be88684a6d0e6e1df75bea11 Mon Sep 17 00:00:00 2001 From: Artyom Belousov Date: Fri, 27 Feb 2026 12:31:32 +0300 Subject: [PATCH] Use trouble for lsp actions --- home/neovim.nix | 56 +++++++++++++++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 20 deletions(-) diff --git a/home/neovim.nix b/home/neovim.nix index 04663d7..40d3f3b 100644 --- a/home/neovim.nix +++ b/home/neovim.nix @@ -126,84 +126,100 @@ }; keymaps = [ { - action = "Oil"; key = "o"; + action = "Oil"; } { - action = "lua require('snacks').picker.files()"; key = "f"; + action = "lua require('snacks').picker.files()"; } { - action = "lua require('snacks').picker.grep()"; key = "l"; + action = "lua require('snacks').picker.grep()"; } { - action = "lua require('snacks').picker.help()"; key = "h"; + action = "lua require('snacks').picker.help()"; } { - action = "lua require('snacks').picker.resume()"; key = "r"; + action = "lua require('snacks').picker.resume()"; } { - action = "lua vim.lsp.buf.format()"; key = "i"; + action = "lua vim.lsp.buf.format()"; } { - action = "lua vim.lsp.buf.code_action()"; key = "a"; + action = "lua vim.lsp.buf.code_action()"; } { - action = "lua vim.diagnostic.goto_prev({ float = true })"; key = "[d"; + action = "lua vim.diagnostic.goto_prev({ float = true })"; } { - action = "lua vim.diagnostic.goto_next({ float = true })"; key = "]d"; + action = "lua vim.diagnostic.goto_next({ float = true })"; } { - action = "Trouble diagnostics"; key = "q"; + action = "Trouble diagnostics"; } { - action = "lua require('harpoon'):list():add()"; key = "k"; + action = "lua require('harpoon'):list():add()"; } { - action = "lua require('harpoon'):list():select(1)"; key = ""; + action = "lua require('harpoon'):list():select(1)"; } { - action = "lua require('harpoon'):list():select(2)"; key = ""; + action = "lua require('harpoon'):list():select(2)"; } { - action = "lua require('harpoon'):list():select(3)"; key = ""; + action = "lua require('harpoon'):list():select(3)"; } { - action = "lua require('harpoon'):list():select(4)"; key = ""; + action = "lua require('harpoon'):list():select(4)"; } { - action = "lua require('harpoon').ui:toggle_quick_menu(require('harpoon'):list())"; key = "j"; + action = "lua require('harpoon').ui:toggle_quick_menu(require('harpoon'):list())"; } { - action = "CopyRelativePath"; key = "p"; + action = "CopyRelativePath"; } { - action = "Neogit"; key = "go"; + action = "Neogit"; } { - action = "Gitsigns blame"; key = "gb"; + action = "Gitsigns blame"; } { - action = "Gitsigns diffthis"; key = "gd"; + action = "Gitsigns diffthis"; + } + { + key = "grr"; + action = "Trouble lsp_references toggle focus=true"; + } + { + key = "gd"; + action = "Trouble lsp_definitions toggle focus=true"; + } + { + key = "gi"; + action = "Trouble lsp_implementations toggle focus=true"; + } + { + key = "gy"; + action = "Trouble lsp_type_definitions toggle focus=true"; } ]; globals.mapleader = " ";