From 8a56a4a350a6521ca44319dbf0038e1c84435d10 Mon Sep 17 00:00:00 2001 From: Michael Flossmann Date: Wed, 11 Sep 2024 10:46:48 +0200 Subject: [PATCH] fix overlaps with flash and surround --- plugins/arrow.nix | 2 +- plugins/flash.nix | 22 +++++++++++++++------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/plugins/arrow.nix b/plugins/arrow.nix index 6899cba..90723fc 100644 --- a/plugins/arrow.nix +++ b/plugins/arrow.nix @@ -5,7 +5,7 @@ extra = { packages = [ pkgs.vimPlugins.arrow-nvim ]; - config = '' + config = /*lua*/ '' require('arrow').setup({ show_icons = true, leader_key = ';', -- Recommended to be a single key diff --git a/plugins/flash.nix b/plugins/flash.nix index fe6fc3e..bc827f2 100644 --- a/plugins/flash.nix +++ b/plugins/flash.nix @@ -1,35 +1,43 @@ -_: +{pkgs, ... }: { opts.enable = true; + extra = { + packages = [ pkgs.vimPlugins.flash-nvim ]; + + config = /*lua*/ '' + require("flash").toggle(true) -- activate toggle flash mode + ''; + }; + rootOpts.keymaps = [ { mode = ["n" "x" "o" ]; - key = "s"; + key = "gs"; options.desc = "Flash jump"; action.__raw = ''function() require("flash").jump() end''; } { mode = "n"; - key = "S"; + key = "gS"; options.desc = "Flash Treesitter"; action.__raw = ''function() require("flash").treesitter() end''; } { mode = "o"; - key = "R"; + key = "gR"; options.desc = "Remote Flash"; action.__raw = ''function() require("flash").remote() end''; } { mode = "o"; - key = "r"; + key = "gr"; options.desc = "Flash Treesitter search"; action.__raw = ''function() require("flash").treesitter_search() end''; } { - mode = "c"; - key = ""; + mode = "n"; + key = "uf"; options.desc = "Toggle flash search"; action.__raw = ''function() require("flash").toggle() end''; }