Skip to content

Commit

Permalink
fix(yaml): yaml validate and enable line folding (LazyVim#1251)
Browse files Browse the repository at this point in the history
* fix(yaml): enable validate

see https://github.com/redhat-developer/yaml-language-server#language-server-settings

* feat(yaml): support line folding
  • Loading branch information
Jomik committed Jul 30, 2023
1 parent 9264c54 commit a62a594
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lua/lazyvim/plugins/extras/lang/yaml.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ return {
-- make sure mason installs the server
servers = {
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
on_new_config = function(new_config)
new_config.settings.yaml.schemas = new_config.settings.yaml.schemas or {}
Expand All @@ -33,7 +42,7 @@ return {
format = {
enable = true,
},
validate = { enable = true },
validate = true,
schemaStore = {
-- Must disable built-in schemaStore support to use
-- schemas from SchemaStore.nvim plugin
Expand Down

0 comments on commit a62a594

Please sign in to comment.