plugins/lsp: add support for mode in non-extra keymaps

This commit is contained in:
Heitor Augusto 2024-12-17 16:01:19 -03:00 committed by nix-infra-bot
parent a74897d033
commit e59e99314b

View file

@ -163,13 +163,16 @@ lib.nixvim.plugins.mkNeovimPlugin {
key: action: key: action:
let let
actionStr = action.action or action; actionStr = action.action or action;
mode = action.mode or "n";
actionProps = lib.optionalAttrs (builtins.isAttrs action) ( actionProps = lib.optionalAttrs (builtins.isAttrs action) (
builtins.removeAttrs action [ "action" ] builtins.removeAttrs action [
"action"
"mode"
]
); );
in in
{ {
inherit key; inherit key mode;
mode = "n";
action = lib.nixvim.mkRaw (prefix + actionStr); action = lib.nixvim.mkRaw (prefix + actionStr);
options = { options = {