From d0b55f6037e692f91e3a3881cfb653f9c38b9aff Mon Sep 17 00:00:00 2001 From: Michael Flossmann Date: Mon, 9 Sep 2024 14:55:39 +0200 Subject: [PATCH] add flash --- plugins/flash.nix | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 plugins/flash.nix diff --git a/plugins/flash.nix b/plugins/flash.nix new file mode 100644 index 0000000..fe6fc3e --- /dev/null +++ b/plugins/flash.nix @@ -0,0 +1,37 @@ +_: +{ + opts.enable = true; + + rootOpts.keymaps = [ + { + mode = ["n" "x" "o" ]; + key = "s"; + options.desc = "Flash jump"; + action.__raw = ''function() require("flash").jump() end''; + } + { + mode = "n"; + key = "S"; + options.desc = "Flash Treesitter"; + action.__raw = ''function() require("flash").treesitter() end''; + } + { + mode = "o"; + key = "R"; + options.desc = "Remote Flash"; + action.__raw = ''function() require("flash").remote() end''; + } + { + mode = "o"; + key = "r"; + options.desc = "Flash Treesitter search"; + action.__raw = ''function() require("flash").treesitter_search() end''; + } + { + mode = "c"; + key = ""; + options.desc = "Toggle flash search"; + action.__raw = ''function() require("flash").toggle() end''; + } + ]; +}