mirror of
https://github.com/nix-community/nixvim.git
synced 2025-11-08 19:46:06 +01:00
plugins/schemastore: use the correct LSP configuration keys for the new lsp module
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.
This commit is contained in:
parent
0d7375b6b7
commit
5c1be58f6d
1 changed files with 2 additions and 2 deletions
|
|
@ -172,7 +172,7 @@ lib.nixvim.plugins.mkVimPlugin {
|
|||
};
|
||||
|
||||
lsp.servers = {
|
||||
jsonls.config.settings = mkIf cfg.json.enable {
|
||||
jsonls.config.settings.json = mkIf cfg.json.enable {
|
||||
schemas.__raw = ''
|
||||
require('schemastore').json.schemas(${lib.nixvim.toLuaObject cfg.json.settings})
|
||||
'';
|
||||
|
|
@ -182,7 +182,7 @@ lib.nixvim.plugins.mkVimPlugin {
|
|||
validate.enable = mkDefault true;
|
||||
};
|
||||
|
||||
yamlls.config.settings = mkIf cfg.yaml.enable {
|
||||
yamlls.config.settings.yaml = mkIf cfg.yaml.enable {
|
||||
schemaStore = {
|
||||
# From the README: "You must disable built-in schemaStore support if you want to use
|
||||
# this plugin and its advanced options like `ignore`."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue