From 12e7bbc80235b7921b32e0086c152c79c8f9236d Mon Sep 17 00:00:00 2001 From: chloe caruso Date: Tue, 19 Aug 2025 01:01:36 -0700 Subject: [PATCH] feat: more neovim things space space -> pick a file in project space b -> pick a buffer space ' -> pick a mark space ? -> search all keyboard shortcuts space ff -> file fuzzy space fg -> file grep (you can access regex search from within these two) (space fg then ctrl+q is helpful) there are many other cute FzfLua menus, such as git_bcommits. but these aren't useful enough on their own to warrent a dedicated key. you wont remember them. but you can remember space tab to open the meta search to search the search providers. i low-key want to use this one at load, so i made it very easy to trigger. space tab bcom enter for example. --- modules/neovim/default.nix | 3 +++ modules/neovim/keybind.nix | 9 +++++---- nvim | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/modules/neovim/default.nix b/modules/neovim/default.nix index 734dd03..446fe23 100644 --- a/modules/neovim/default.nix +++ b/modules/neovim/default.nix @@ -120,6 +120,9 @@ enable = true; setupOpts = { fzf_colors = true; + keymap.fzf = { + "ctrl-q" = "select-all+accept"; + }; }; }; autocomplete.blink-cmp = { diff --git a/modules/neovim/keybind.nix b/modules/neovim/keybind.nix index f5b2d0f..42732a6 100644 --- a/modules/neovim/keybind.nix +++ b/modules/neovim/keybind.nix @@ -24,11 +24,12 @@ in # pickers pick-file = keyCmd "n" "" "FzfLua files"; + pick-buffer = keyCmd "n" "b" "FzfLua buffers"; pick-mark = keyCmd "n" "'" "FzfLua marks"; - #pick-buffer = keyCmd "n" "b" "FzfLua buffers"; - pick-grep = keyCmd "n" "ff" "FzfLua grep_project"; pick-recent-command = keyCmd "n" "fc" "FzfLua command_history"; - pick-other = keyCmd "n" "f?" "FzfLua builtin"; # picker of Fzf pickers + pick-other = keyCmd "n" "" "FzfLua builtin"; # picker of Fzf pickers + find-fuzzy = keyCmd "n" "ff" "FzfLua grep_project"; + find-grep = keyCmd "n" "fg" "FzfLua live_grep"; # lsp code-action = @@ -38,7 +39,7 @@ in # subtle nice features visual-dedent = keyRemap "v" "<" "" ">gv"; # keep selection - clear-search-highlights = keyRemap "n" ""; + clear-search-highlights = keyRemap "n" "" ":noh"; }; # implementation diff --git a/nvim b/nvim index 9301a34..607cc6c 100755 --- a/nvim +++ b/nvim @@ -11,4 +11,4 @@ if [ -z "$name" ]; then echo "Configure this wrapper script with your name." >&2 exit 1 fi -exec nix run ".#nvim-$name" -- "$@" +exec nix run "$(dirname "$0")#nvim-$name" -- "$@"