Skip to content

Commit 838829c

Browse files
committed
lsp/keymaps: cosmetic implem changes
1 parent 80e49e7 commit 838829c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plugins/lsp/default.nix

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ in
196196
mapAttrsToList (
197197
key: action:
198198
let
199-
actionStr = if isString action then action else action.action;
200-
actionProps = if isString action then { } else filterAttrs (n: v: n != "action") action;
199+
actionStr = action.action or action;
200+
actionProps = optionalAttrs (isAttrs action) (removeAttrs action [ "action" ]);
201201
in
202202
{
203203
mode = "n";
@@ -210,8 +210,8 @@ in
210210
}
211211
);
212212
in
213-
(mkMaps "vim.diagnostic." cfg.keymaps.diagnostic)
214-
++ (mkMaps "vim.lsp.buf." cfg.keymaps.lspBuf)
213+
mkMaps "vim.diagnostic." cfg.keymaps.diagnostic
214+
++ mkMaps "vim.lsp.buf." cfg.keymaps.lspBuf
215215
++ cfg.keymaps.extra;
216216

217217
# Enable inlay-hints

0 commit comments

Comments
 (0)