From cf6c8ef1fa5a915684dc9926482b2d31396101ea Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Fri, 3 Oct 2025 23:49:38 +0100 Subject: [PATCH] modules/lsp: be explicit about shorthandOnlyDefinesConfig `shorthandOnlyDefinesConfig` is true by default for `lib.types.submodule`, and false by default for `lib.types.submoduleWith` and `lib.evalModules`. Since we rely on it for our `lsp.servers.*.config` option, let's enable it explicitly. --- modules/lsp/servers/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/lsp/servers/default.nix b/modules/lsp/servers/default.nix index ead07f04..cc2955cd 100644 --- a/modules/lsp/servers/default.nix +++ b/modules/lsp/servers/default.nix @@ -19,7 +19,14 @@ let # Create a submodule type from `server.nix` # Used as the type for both the freeform `lsp.servers.` # and the explicitly declared `lsp.servers.*` options - mkServerType = args: types.submodule (mkServerModule args); + mkServerType = + args: + types.submoduleWith { + # Server modules have a `config` option, so we must use + # shorthandOnlyDefinesConfig to avoid confusing the module system. + shorthandOnlyDefinesConfig = true; + modules = [ (mkServerModule args) ]; + }; # Create a server option # Used below for the `lsp.servers.*` options