diff --git a/modules/nixvim/editing.nix b/modules/nixvim/editing.nix index f9ee3ab..d098a9e 100644 --- a/modules/nixvim/editing.nix +++ b/modules/nixvim/editing.nix @@ -3,7 +3,9 @@ { plugins.sleuth.enable = true; plugins.nvim-surround.enable = true; - plugins.flash.enable = true; + plugins.flash = { + enable = true; + }; plugins.blink-pairs = { enable = true; @@ -61,5 +63,13 @@ "TextYankPost" ]; } + { + event = [ "BufReadPost" ]; + callback.__raw = /* lua */ '' + function() + vim.keymap.set(" n ", " ", " ", { buffer = true }) + end + ''; + } ]; } diff --git a/modules/nixvim/keybindings.nix b/modules/nixvim/keybindings.nix index 2f18c5f..3adf008 100644 --- a/modules/nixvim/keybindings.nix +++ b/modules/nixvim/keybindings.nix @@ -116,5 +116,19 @@ action = "close"; options.desc = "Delete window only"; } + { + mode = [ + "n" + "x" + "o" + ]; + action.__raw = /* lua */ '' + function() + if vim.bo.filetype ~= "qf" then + require("flash").jump() + end + end, + ''; + } ]; }