feat: support yaml language server schema validate

This commit is contained in:
Young Xu 2023-04-02 17:45:18 +08:00
parent 1db5944feb
commit 5ee995ebea
Signed by: xuthus5
GPG Key ID: A23CF9620CBB55F9

View File

@ -8,4 +8,18 @@ require("lspconfig").jsonls.setup({
require("lspconfig").taplo.setup({})
require("lspconfig").yamlls.setup({})
require("lspconfig").yamlls.setup({
capabilities = capabilities,
settings = {
yaml = {
schemas = {
["https://json.schemastore.org/golangci-lint.json"] = ".golangci.yaml",
["https://json.schemastore.org/yamllint.json"] = ".protolint.yaml",
["https://raw.githubusercontent.com/instrumenta/kubernetes-json-schema/master/v1.18.0-standalone-strict/all.json"] = "/*.k8s.yaml",
},
schemaStore = { enable = true },
format = { enable = true },
completion = true,
},
},
})