plugins/lsp: fix enabledServers.extraOptions type merging

Use `attrsOf` instead of `attrs` to ensure recursive merging, otherwise
things like `extraOptions.settings = lib.mkIf` will not be unwrapped by
the module system.
This commit is contained in:
Matt Sturgeon 2024-11-26 13:19:50 +00:00
parent a1c352affc
commit 8b19d15482
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
2 changed files with 113 additions and 3 deletions

View file

@ -29,7 +29,7 @@ in
};
diagnostic = mkOption {
type = with types; attrsOf (either str attrs);
type = with types; attrsOf (either str (attrsOf anything));
description = "Mappings for `vim.diagnostic.<action>` functions to be added when an LSP is attached.";
example = {
"<leader>k" = "goto_prev";
@ -39,7 +39,7 @@ in
};
lspBuf = mkOption {
type = with types; attrsOf (either str attrs);
type = with types; attrsOf (either str (attrsOf anything));
description = "Mappings for `vim.lsp.buf.<action>` functions to be added when an LSP it attached.";
example = {
"gd" = "definition";
@ -106,7 +106,7 @@ in
};
extraOptions = mkOption {
type = attrs;
type = attrsOf anything;
description = "Extra options for the server";
};
};