From cf72e73615f2872f4342732aafd6c735cb31aace Mon Sep 17 00:00:00 2001 From: chloe caruso Date: Thu, 21 Aug 2025 15:38:12 -0700 Subject: [PATCH] changes to neovim lsp keybinds --- modules/neovim/default.nix | 18 ++++++++++++++---- modules/neovim/keybind.nix | 1 + users/clover/home.nix | 4 ++++ 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/modules/neovim/default.nix b/modules/neovim/default.nix index c436602..5d9d90e 100644 --- a/modules/neovim/default.nix +++ b/modules/neovim/default.nix @@ -60,15 +60,17 @@ inlayHints.enable = true; # Nice mappings that I use :3 mappings = { - codeAction = "ca"; + codeAction = null; # in keymaps goToDeclaration = "gD"; goToDefinition = "gd"; - listReferences = "gr"; - goToType = "gy"; + # TODO: changing these works but there is something else defining stuff + # like grn, grr, grt, etc + listReferences = "grr"; + goToType = "grt"; hover = "K"; nextDiagnostic = null; # ]d openDiagnosticFloat = "d"; - renameSymbol = "rn"; + renameSymbol = "grn"; documentHighlight = null; listDocumentSymbols = null; listImplementations = null; @@ -83,6 +85,14 @@ treesitter = { enable = true; addDefaultGrammars = true; + # this is buggy and keybind.nix overwrites its keymaps anyways + incrementalSelection.enable = false; + mappings.incrementalSelection = { + decrementByNode = null; + incrementByNode = null; + incrementByScope = null; + init = null; + }; }; debugger.nvim-dap = { enable = true; diff --git a/modules/neovim/keybind.nix b/modules/neovim/keybind.nix index 2b4a4d2..39e784e 100644 --- a/modules/neovim/keybind.nix +++ b/modules/neovim/keybind.nix @@ -40,6 +40,7 @@ in # subtle nice features visual-dedent = keyRemap "v" "<" "" ">gv"; # keep selection + visual-overwrite = keyRemap "v" "p" "pgvygv"; # re-yank text clear-search-highlights = keyRemap "n" "" ":noh"; }; diff --git a/users/clover/home.nix b/users/clover/home.nix index 3fddc20..bc04b2a 100644 --- a/users/clover/home.nix +++ b/users/clover/home.nix @@ -69,6 +69,10 @@ in shellAliases = { switch = "nh darwin switch ~/config"; + gg = "lazygit"; + ga = "git add"; + g = "git status"; + gp = "git pull --rebase && git push"; }; profileExtra = '' function python() {