fix(yaml): yaml schemas are a dict, not a list, so merge properly. Fixes #1636

This commit is contained in:
Folke Lemaitre
2023-10-08 19:29:00 +02:00
parent e11a3cbe80
commit 33c677a55e

View File

@ -35,8 +35,11 @@ return {
},
-- lazy-load schemastore when needed
on_new_config = function(new_config)
new_config.settings.yaml.schemas = new_config.settings.yaml.schemas or {}
vim.list_extend(new_config.settings.yaml.schemas, require("schemastore").yaml.schemas())
new_config.settings.yaml.schemas = vim.tbl_deep_extend(
"force",
new_config.settings.yaml.schemas or {},
require("schemastore").yaml.schemas()
)
end,
settings = {
redhat = { telemetry = { enabled = false } },