mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-30 04:14:28 +02:00
plugins/misc: adapt to new maps options
This commit is contained in:
parent
574fb73258
commit
dd6a114e52
18 changed files with 262 additions and 193 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue