From f0dceb449af35c83a0e2bf23c71f50fc61aff42f Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Fri, 7 Nov 2025 00:34:10 +0100 Subject: [PATCH] plugins/leap: remove addDefaultMappings as it was removed upstream --- plugins/by-name/leap/default.nix | 38 ++++++++----------- .../plugins/by-name/leap/default.nix | 1 - 2 files changed, 16 insertions(+), 23 deletions(-) diff --git a/plugins/by-name/leap/default.nix b/plugins/by-name/leap/default.nix index a6e54002..f3b99c97 100644 --- a/plugins/by-name/leap/default.nix +++ b/plugins/by-name/leap/default.nix @@ -2,38 +2,32 @@ lib, ... }: -let - inherit (lib) types; -in lib.nixvim.plugins.mkNeovimPlugin { name = "leap"; package = "leap-nvim"; maintainers = [ lib.maintainers.khaneliman ]; - extraOptions = { - addDefaultMappings = lib.mkOption { - type = types.bool; - default = true; - description = "Whether to enable the default mappings."; - }; - }; - callSetup = false; extraConfig = cfg: { - plugins.leap.luaConfig.content = - lib.optionalString cfg.addDefaultMappings '' - require('leap').add_default_mappings() - '' - + lib.optionalString (cfg.settings != { }) '' - require('leap').opts = vim.tbl_deep_extend( - "keep", - ${lib.nixvim.toLuaObject cfg.settings}, - require('leap').opts - ) - ''; + plugins.leap.luaConfig.content = lib.optionalString (cfg.settings != { }) '' + require('leap').opts = vim.tbl_deep_extend( + "keep", + ${lib.nixvim.toLuaObject cfg.settings}, + require('leap').opts + ) + ''; }; + # TODO: Added 2025-11-07. Remove after 26.05 + imports = [ + (lib.mkRemovedOptionModule [ + "plugins" + "leap" + "addDefaultMappings" + ] "See `:help leap-mappings` to update your config") + ]; + # TODO: Deprecated 2025-10-04 inherit (import ./deprecations.nix) optionsRenamedToSettings diff --git a/tests/test-sources/plugins/by-name/leap/default.nix b/tests/test-sources/plugins/by-name/leap/default.nix index 31589162..ec6af93f 100644 --- a/tests/test-sources/plugins/by-name/leap/default.nix +++ b/tests/test-sources/plugins/by-name/leap/default.nix @@ -18,7 +18,6 @@ example = { plugins.leap = { enable = true; - addDefaultMappings = true; settings = { max_phase_one_targets = 10; highlight_unlabeled_phase_one_targets = false;