plugins/misc: adapt to new maps options

This commit is contained in:
Gaetan Lepage 2023-09-15 14:35:13 +02:00 committed by Gaétan Lepage
parent 574fb73258
commit dd6a114e52
18 changed files with 262 additions and 193 deletions

View file

@ -181,21 +181,23 @@ in {
require("neogen").setup(${helpers.toLuaObject setupOptions})
'';
maps.normal = mkMerge (
mapAttrsToList
keymaps =
flatten
(
optionName: properties: let
key = cfg.keymaps.${optionName};
in
mkIf (key != null)
{
${key} = {
mapAttrsToList
(
optionName: properties: let
key = cfg.keymaps.${optionName};
in
optional (key != null)
{
mode = "n";
inherit key;
action = ":Neogen ${properties.command}<CR>";
silent = cfg.keymapsSilent;
};
}
)
keymapDef
);
options.silent = cfg.keymapsSilent;
}
)
keymapDef
);
};
}