Skip to content

YAML Extra

lang.yaml adds YAML support through yaml-language-server, wired to the SchemaStore.nvim schema catalog for validation and completion against well-known schemas (GitHub Actions, Kubernetes, Compose, and more), with Prettier formatting.

-- ~/.config/blak/lua/blak/user.lua
return {
extras = {
enabled = {
"lang.yaml",
},
},
}

Because this extra adds a plugin (SchemaStore.nvim), run:

:BlakExtras sync
Surface Contribution
Treesitter yaml
Mason prettier, prettierd
LSP yamlls with SchemaStore schemas
Formatting prettierd (fallback prettier) for yaml
Plugin b0o/SchemaStore.nvim

yamlls installs automatically through Mason (package yaml-language-server).

SchemaStore.nvim is pulled in lazily from the server’s before_init hook, so the schema catalog only loads when yamlls actually starts. The extra disables the server’s built-in schema store in favor of SchemaStore.nvim. To pin a schema to a path, add it under lsp.servers.yamlls.settings.yaml.schemas:

return {
extras = { enabled = { "lang.yaml" } },
lsp = {
servers = {
yamlls = {
settings = {
yaml = {
schemas = {
["https://json.schemastore.org/github-workflow.json"] = "/.github/workflows/*",
},
},
},
},
},
},
}
:BlakExtras sync
:BlakToolsInstall
:BlakTreesitterInstall
:BlakDoctor

Open a .yaml file and check :LspInfo for yaml-language-server.