diff --git a/nix/neovim-overlay.nix b/nix/neovim-overlay.nix index bda2c1a..782d5f0 100644 --- a/nix/neovim-overlay.nix +++ b/nix/neovim-overlay.nix @@ -52,6 +52,7 @@ with final.pkgs.lib; let # Editor neo-tree-nvim grug-far-nvim + flash-nvim ]; extraPackages = with pkgs; [ diff --git a/nvim/lua/plugins/editor/flash-nvim.lua b/nvim/lua/plugins/editor/flash-nvim.lua new file mode 100644 index 0000000..9cce8d3 --- /dev/null +++ b/nvim/lua/plugins/editor/flash-nvim.lua @@ -0,0 +1,47 @@ +return { + 'flash.nvim', + event = 'DeferredUIEnter', + keys = { + { + 's', + function() + require('flash').jump() + end, + mode = { 'n', 'x', 'o' }, + desc = 'Flash', + }, + { + 'S', + function() + require('flash').treesitter() + end, + mode = { 'n', 'x', 'o' }, + desc = 'Flash (treesitter)', + }, + { + 'r', + function() + require('flash').remote() + end, + desc = 'Remote flash', + }, + { + 'R', + function() + require('flash').treesitter_search() + end, + mode = { 'x', 'o' }, + desc = 'Treesitter search', + }, + { + '', + function() + require('flash').toggle() + end, + 'Toggle flash search', + }, + }, + after = function() + require('flash').setup({}) + end, +} diff --git a/nvim/lua/plugins/editor/init.lua b/nvim/lua/plugins/editor/init.lua index ba2bb31..1c7ac76 100644 --- a/nvim/lua/plugins/editor/init.lua +++ b/nvim/lua/plugins/editor/init.lua @@ -1,6 +1,7 @@ local req = MarleyVim.local_require('plugins.editor') return { + req('flash-nvim'), req('grug-far-nvim'), req('neo-tree-nvim'), }