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

@ -33,20 +33,29 @@ in {
config = mkIf cfg.enable {
extraPlugins = [cfg.package];
maps.normal = with cfg.keymaps;
(optionalAttrs (bdelete != null)
{
${bdelete} = {
keymaps = with cfg.keymaps;
helpers.mkKeymaps
{
mode = "n";
options.silent = cfg.keymapsSilent;
}
(
(
optional
(bdelete != null)
{
key = bdelete;
action = ":Bdelete<CR>";
silent = cfg.keymapsSilent;
};
})
// (optionalAttrs (bwipeout != null)
{
${bwipeout} = {
}
)
++ (
optional
(bwipeout != null)
{
key = bwipeout;
action = ":Bwipeout<CR>";
silent = cfg.keymapsSilent;
};
});
}
)
);
};
}