From 5eaa5212a5b55819bcf7027dcd01080a7dbf0532 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Mon, 31 Mar 2025 22:49:03 +0200 Subject: nixvim-dev: use official LSP bindings, but with Trouble --- common/nixvim.nix | 4 +++ usecases/desktop/development/nixvim-dev.nix | 41 ++++++++++++----------------- 2 files changed, 21 insertions(+), 24 deletions(-) diff --git a/common/nixvim.nix b/common/nixvim.nix index 69561ea..768540e 100644 --- a/common/nixvim.nix +++ b/common/nixvim.nix @@ -479,6 +479,10 @@ inputs: mode = "n"; keys = ""; } + { + mode = "n"; + keys = "gr"; + } ]; }; trailspace = { }; diff --git a/usecases/desktop/development/nixvim-dev.nix b/usecases/desktop/development/nixvim-dev.nix index 672ab81..a20e0a8 100644 --- a/usecases/desktop/development/nixvim-dev.nix +++ b/usecases/desktop/development/nixvim-dev.nix @@ -37,17 +37,26 @@ _inputs: extra = [ { - key = "gd"; - action = "require('telescope.builtin').lsp_definitions"; - lua = true; - options.desc = "LSP definitions"; + key = "grr"; + action = "Trouble lsp_references focus=true"; + options.desc = "LSP references"; } { - key = "gr"; - action = "require('telescope.builtin').lsp_references"; - lua = true; - options.desc = "LSP references"; + key = "gri"; + action = "Trouble lsp_implementations focus=true"; + options.desc = "LSP implementations"; + } + { + key = "gO"; + action = "Trouble lsp_document_symbols focus=true"; + options.desc = "LSP document symbols"; } + { + key = "gd"; + action = "Trouble lsp_definitions focus=true"; + options.desc = "LSP definitions"; + } + { key = "sd"; action = "require('lsp_lines').toggle"; @@ -75,27 +84,11 @@ _inputs: ]; lspBuf = { - gr = { - action = "references"; - desc = "LSP references"; - }; # TODO setup actions-preview-nvim - "sa" = { - action = "code_action"; - desc = "LSP code actions"; - }; "sf" = { action = "format"; desc = "LSP format"; }; - "si" = { - action = "implementation"; - desc = "LSP implementation"; - }; - "sr" = { - action = "rename"; - desc = "LSP rename"; - }; "st" = { action = "type_definition"; desc = "LSP type definition"; -- cgit v1.2.3