mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
plugins/lsp: add support for mode in non-extra keymaps
This commit is contained in:
parent
a74897d033
commit
e59e99314b
1 changed files with 6 additions and 3 deletions
|
@ -163,13 +163,16 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
key: action:
|
||||
let
|
||||
actionStr = action.action or action;
|
||||
mode = action.mode or "n";
|
||||
actionProps = lib.optionalAttrs (builtins.isAttrs action) (
|
||||
builtins.removeAttrs action [ "action" ]
|
||||
builtins.removeAttrs action [
|
||||
"action"
|
||||
"mode"
|
||||
]
|
||||
);
|
||||
in
|
||||
{
|
||||
inherit key;
|
||||
mode = "n";
|
||||
inherit key mode;
|
||||
action = lib.nixvim.mkRaw (prefix + actionStr);
|
||||
|
||||
options = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue