mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-24 17:58:51 +02:00
fix(yaml): yaml validate and enable line folding (#1251)
* fix(yaml): enable validate see https://github.com/redhat-developer/yaml-language-server#language-server-settings * feat(yaml): support line folding
This commit is contained in:
parent
9264c54ae9
commit
a62a5942de
1 changed files with 10 additions and 1 deletions
|
@ -21,6 +21,15 @@ return {
|
||||||
-- make sure mason installs the server
|
-- make sure mason installs the server
|
||||||
servers = {
|
servers = {
|
||||||
yamlls = {
|
yamlls = {
|
||||||
|
-- Have to add this for yamlls to understand that we support line folding
|
||||||
|
capabilities = {
|
||||||
|
textDocument = {
|
||||||
|
foldingRange = {
|
||||||
|
dynamicRegistration = false,
|
||||||
|
lineFoldingOnly = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
-- lazy-load schemastore when needed
|
-- lazy-load schemastore when needed
|
||||||
on_new_config = function(new_config)
|
on_new_config = function(new_config)
|
||||||
new_config.settings.yaml.schemas = new_config.settings.yaml.schemas or {}
|
new_config.settings.yaml.schemas = new_config.settings.yaml.schemas or {}
|
||||||
|
@ -33,7 +42,7 @@ return {
|
||||||
format = {
|
format = {
|
||||||
enable = true,
|
enable = true,
|
||||||
},
|
},
|
||||||
validate = { enable = true },
|
validate = true,
|
||||||
schemaStore = {
|
schemaStore = {
|
||||||
-- Must disable built-in schemaStore support to use
|
-- Must disable built-in schemaStore support to use
|
||||||
-- schemas from SchemaStore.nvim plugin
|
-- schemas from SchemaStore.nvim plugin
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue