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

@ -83,24 +83,31 @@ in {
let $BAT_THEME = '${cfg.highlightTheme}'
'';
maps.normal =
mapAttrs
(key: action: let
actionStr =
if isString action
then action
else action.action;
actionProps =
if isString action
then {}
else filterAttrs (n: v: n != "action") action;
in
{
silent = cfg.keymapsSilent;
keymaps =
mapAttrsToList
(
key: action: let
actionStr =
if isString action
then action
else action.action;
actionProps =
if isString action
then {}
else filterAttrs (n: v: n != "action") action;
in {
mode = "n";
inherit key;
action = "require('telescope.builtin').${actionStr}";
lua = true;
options =
{
silent = cfg.keymapsSilent;
}
// actionProps;
}
// actionProps)
)
cfg.keymaps;
extraConfigLua = let