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:
parent
9256b49ec0
commit
f0dceb449a
2 changed files with 16 additions and 23 deletions
|
|
@ -2,38 +2,32 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
|
||||||
inherit (lib) types;
|
|
||||||
in
|
|
||||||
lib.nixvim.plugins.mkNeovimPlugin {
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
name = "leap";
|
name = "leap";
|
||||||
package = "leap-nvim";
|
package = "leap-nvim";
|
||||||
|
|
||||||
maintainers = [ lib.maintainers.khaneliman ];
|
maintainers = [ lib.maintainers.khaneliman ];
|
||||||
|
|
||||||
extraOptions = {
|
|
||||||
addDefaultMappings = lib.mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = true;
|
|
||||||
description = "Whether to enable the default mappings.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
callSetup = false;
|
callSetup = false;
|
||||||
extraConfig = cfg: {
|
extraConfig = cfg: {
|
||||||
plugins.leap.luaConfig.content =
|
plugins.leap.luaConfig.content = lib.optionalString (cfg.settings != { }) ''
|
||||||
lib.optionalString cfg.addDefaultMappings ''
|
require('leap').opts = vim.tbl_deep_extend(
|
||||||
require('leap').add_default_mappings()
|
"keep",
|
||||||
''
|
${lib.nixvim.toLuaObject cfg.settings},
|
||||||
+ lib.optionalString (cfg.settings != { }) ''
|
require('leap').opts
|
||||||
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
|
# TODO: Deprecated 2025-10-04
|
||||||
inherit (import ./deprecations.nix)
|
inherit (import ./deprecations.nix)
|
||||||
optionsRenamedToSettings
|
optionsRenamedToSettings
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@
|
||||||
example = {
|
example = {
|
||||||
plugins.leap = {
|
plugins.leap = {
|
||||||
enable = true;
|
enable = true;
|
||||||
addDefaultMappings = true;
|
|
||||||
settings = {
|
settings = {
|
||||||
max_phase_one_targets = 10;
|
max_phase_one_targets = 10;
|
||||||
highlight_unlabeled_phase_one_targets = false;
|
highlight_unlabeled_phase_one_targets = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue