From 94d2b837cf20899df811dae1dbb02ddbc751b965 Mon Sep 17 00:00:00 2001 From: Soliprem <73885403+Soliprem@users.noreply.github.com> Date: Mon, 14 Oct 2024 22:47:44 +0200 Subject: [PATCH] leap: changing default binds (#416) * leap: changed default binds * leap: added changelog entry * leap: fixing requested change Co-authored-by: diniamo <55629891+diniamo@users.noreply.github.com> * Revert "leap: added changelog entry" This reverts commit 6aac9b2580d707aa28c6cf008f89580f8973ac48. * leap: added changelog entry * leap: fix inherits --------- Co-authored-by: diniamo <55629891+diniamo@users.noreply.github.com> --- docs/release-notes/rl-0.7.md | 1 + modules/plugins/utility/motion/leap/config.nix | 4 +++- modules/plugins/utility/motion/leap/leap.nix | 8 ++++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/release-notes/rl-0.7.md b/docs/release-notes/rl-0.7.md index f8cec50..87861e2 100644 --- a/docs/release-notes/rl-0.7.md +++ b/docs/release-notes/rl-0.7.md @@ -264,6 +264,7 @@ everyone. ccc - Add LSP, diagnostics, formatter and Treesitter support for Kotlin under `vim.languages.kotlin` +- changed default keybinds for leap.nvim to avoid altering expected behavior [Bloxx12](https://github.com/Bloxx12) diff --git a/modules/plugins/utility/motion/leap/config.nix b/modules/plugins/utility/motion/leap/config.nix index 9ede98f..687ed24 100644 --- a/modules/plugins/utility/motion/leap/config.nix +++ b/modules/plugins/utility/motion/leap/config.nix @@ -3,7 +3,7 @@ lib, ... }: let - inherit (lib.modules) mkIf mkMerge; + inherit (lib.modules) mkIf mkMerge mkDefault; inherit (lib.nvim.binds) mkBinding; inherit (lib.nvim.dag) entryAnywhere; @@ -37,6 +37,8 @@ in { (mkBinding cfg.mappings.leapFromWindow "(leap-from-window)" "Leap from window") ]; + vim.binds.whichKey.register."s" = mkDefault "+Leap"; + vim.pluginRC.leap-nvim = entryAnywhere '' require('leap').opts = { max_phase_one_targets = nil, diff --git a/modules/plugins/utility/motion/leap/leap.nix b/modules/plugins/utility/motion/leap/leap.nix index a5d7243..4e98f20 100644 --- a/modules/plugins/utility/motion/leap/leap.nix +++ b/modules/plugins/utility/motion/leap/leap.nix @@ -9,22 +9,22 @@ in { leapForwardTo = mkOption { type = nullOr str; description = "Leap forward to"; - default = "s"; + default = "ss"; }; leapBackwardTo = mkOption { type = nullOr str; description = "Leap backward to"; - default = "S"; + default = "sS"; }; leapForwardTill = mkOption { type = nullOr str; description = "Leap forward till"; - default = "x"; + default = "sx"; }; leapBackwardTill = mkOption { type = nullOr str; description = "Leap backward till"; - default = "X"; + default = "sX"; }; leapFromWindow = mkOption { type = nullOr str;