The old lsp module wrapped (in plugins/lsp/language-servers/default.nix)
all configuration of the jsonls and yamlls servers in `json` and `yaml`
keys respectively, so the schemastore module never needed to add those
keys.
However, the new lsp module passes the configuration as-is instead. This
means that the schemastore module must be the one to wrap the
configuration in the `json` and `yaml` keys. Without this, jsonls does
not get its support enabled at all, and yamlls falls back to the
built-in support.
Modify warnings, tests, and default settings to work with the new lsp
module.
Update plugins/by-name/schemastore/default.nix
Co-authored-by: Matt Sturgeon <matt@sturgeon.me.uk>
Update plugins/by-name/schemastore/default.nix
Co-authored-by: Matt Sturgeon <matt@sturgeon.me.uk>
the JSON language server has the following [configuration structure](6fef251f8f/extensions/json-language-features/server/src/jsonServer.ts (L167-L179)):
```ts
// The settings interface describes the server relevant settings part
interface Settings {
json?: {
schemas?: JSONSchemaSettings[];
format?: { enable?: boolean };
validate?: { enable?: boolean };
resultLimit?: number;
};
http?: {
proxy?: string;
proxyStrictSSL?: boolean;
};
}
```
So, we should be mkDefault'ing `validate.enable` instead of `validate`, as `validate` is expected to be an `Object` containing `enable` as a boolean.