pkgsets/nvim: update lsp config to use opts
This commit is contained in:
parent
d8f29e12b5
commit
378da9479f
17 changed files with 355 additions and 339 deletions
|
@ -5,20 +5,22 @@
|
|||
...
|
||||
}:
|
||||
|
||||
lib.optionalString (lib.elem "nvim::lsp::yaml" config.machine.pkgs) # lua
|
||||
''
|
||||
lspconfig.yamlls.setup({
|
||||
cmd = { "${pkgs.yaml-language-server}/bin/yaml-language-server", "--stdio" },
|
||||
settings = {
|
||||
yaml = {
|
||||
schemaStore = {
|
||||
-- Disable to use Store from SchemaStore-nvim plugin
|
||||
enable = false,
|
||||
-- Avoid TypeError: Cannot read properties of undefined (reading 'length')
|
||||
url = "",
|
||||
},
|
||||
schemas = require('schemastore').yaml.schemas(),
|
||||
},
|
||||
},
|
||||
})
|
||||
''
|
||||
lib.optionalAttrs (lib.elem "nvim::lsp::yaml" config.machine.pkgs) {
|
||||
yamlls = {
|
||||
cmd = [
|
||||
"${pkgs.yaml-language-server}/bin/yaml-language-server"
|
||||
"--stdio"
|
||||
];
|
||||
settings = {
|
||||
yaml = {
|
||||
schemaStore = {
|
||||
# Disable to use Store from SchemaStore-nvim plugin
|
||||
enable = false;
|
||||
# Avoid TypeError: Cannot read properties of undefined (reading 'length')
|
||||
url = "";
|
||||
};
|
||||
schemas = _: "require('schemastore').yaml.schemas()";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue