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:
Matt Sturgeon 2024-06-07 08:43:41 +01:00
parent c16533b3f7
commit 302262304e
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
3 changed files with 11 additions and 21 deletions

View file

@ -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;
};