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

@ -299,21 +299,24 @@ in {
require("coverage").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 = ":Coverage${properties.command}<CR>";
silent = cfg.keymapsSilent;
};
}
)
keymapsDef
);
options.silent = cfg.keymapsSilent;
}
)
keymapsDef
);
};
}