mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-16 12:14:32 +02:00
lib/keymaps: refactor mkMapOptionSubmodule
again
Allow passing in `key` and `action` as either bool or an attrset. If `false`, the option is omitted. If `true` or an attrset, the option is included. If an attrset is used, it will update the default `mkOption` args. This is useful for overriding `type` or adding an `example`.
This commit is contained in:
parent
c16533b3f7
commit
302262304e
3 changed files with 11 additions and 21 deletions
|
@ -198,8 +198,6 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
|||
mode = "n";
|
||||
action = "<Cmd>Buffer${funcName}<CR>";
|
||||
};
|
||||
hasKey = true;
|
||||
hasAction = true;
|
||||
}) "Keymap for function Buffer${funcName}"
|
||||
) keymapsActions;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue