1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-11-09 03:56:05 +01:00

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.
This commit is contained in:
Matt Sturgeon 2025-10-03 23:49:38 +01:00
parent 9f336d2d71
commit cf6c8ef1fa

View file

@ -19,7 +19,14 @@ let
# Create a submodule type from `server.nix`
# Used as the type for both the freeform `lsp.servers.<name>`
# 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