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:
|
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 = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue