plugins/lsp: Reduce indent on attr set and use helpers.mkRaw

This commit is contained in:
Daniel 2024-03-26 13:38:45 +00:00 committed by Gaétan Lepage
parent 03009d0b99
commit e229e3ad44

View file

@ -260,8 +260,7 @@ in {
mkIf cfg.enable {
extraPlugins = [pkgs.vimPlugins.nvim-lspconfig];
keymapsOnEvents = {
"LspAttach" = let
keymapsOnEvents.LspAttach = let
mkMaps = prefix:
mapAttrsToList
(
@ -277,7 +276,7 @@ in {
in {
mode = "n";
inherit key;
action.__raw = prefix + actionStr;
action = helpers.mkRaw (prefix + actionStr);
options =
{
@ -290,7 +289,6 @@ in {
(mkMaps "vim.diagnostic." cfg.keymaps.diagnostic)
++ (mkMaps "vim.lsp.buf." cfg.keymaps.lspBuf)
++ cfg.keymaps.extra;
};
# Enable all LSP servers
extraConfigLua = ''