1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-11-08 11:36:07 +01:00

plugins/leap: remove addDefaultMappings as it was removed upstream

This commit is contained in:
Gaetan Lepage 2025-11-07 00:34:10 +01:00 committed by Gaétan Lepage
parent 9256b49ec0
commit f0dceb449a
2 changed files with 16 additions and 23 deletions

View file

@ -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

View file

@ -18,7 +18,6 @@
example = {
plugins.leap = {
enable = true;
addDefaultMappings = true;
settings = {
max_phase_one_targets = 10;
highlight_unlabeled_phase_one_targets = false;