mirror of
https://github.com/nix-community/nixvim.git
synced 2025-11-08 19:46:06 +01:00
plugins/leap: remove addDefaultMappings as it was removed upstream
This commit is contained in:
parent
a42963e4e4
commit
93d7a244a4
2 changed files with 16 additions and 23 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
example = {
|
||||
plugins.leap = {
|
||||
enable = true;
|
||||
addDefaultMappings = true;
|
||||
settings = {
|
||||
max_phase_one_targets = 10;
|
||||
highlight_unlabeled_phase_one_targets = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue