lsp/keymaps: cosmetic implem changes

This commit is contained in:
Gaetan Lepage 2024-12-02 01:14:50 +01:00
parent 80e49e7fd3
commit 838829c8f9

View file

@ -196,8 +196,8 @@ in
mapAttrsToList ( mapAttrsToList (
key: action: key: action:
let let
actionStr = if isString action then action else action.action; actionStr = action.action or action;
actionProps = if isString action then { } else filterAttrs (n: v: n != "action") action; actionProps = optionalAttrs (isAttrs action) (removeAttrs action [ "action" ]);
in in
{ {
mode = "n"; mode = "n";
@ -210,8 +210,8 @@ in
} }
); );
in in
(mkMaps "vim.diagnostic." cfg.keymaps.diagnostic) mkMaps "vim.diagnostic." cfg.keymaps.diagnostic
++ (mkMaps "vim.lsp.buf." cfg.keymaps.lspBuf) ++ mkMaps "vim.lsp.buf." cfg.keymaps.lspBuf
++ cfg.keymaps.extra; ++ cfg.keymaps.extra;
# Enable inlay-hints # Enable inlay-hints