yayamlls
Yet Another YAML Language Server in Go. Schema-driven diagnostics, completion, and
hover; pluggable rendering for Flux HelmRelease and Kustomization
sources via [home-operations/flate][flate].
Per-document schema resolution, highest priority first:
- in-file modeline (
# yaml-language-server: $schema=<url>)
- workspace
schemas: glob in .yayamlls.yaml
- JSON Schema Store catalog (filename match)
- Kubernetes
apiVersion+kind → kubernetes.schemaUrl template
Multi-doc files validate each document against its own schema. The
default kubernetes.schemaUrl is
https://k8s-schemas.home-operations.com/{groupSeg}{kindLower}_{versionLower}.json;
override in .yayamlls.yaml to point elsewhere. 404s are silently skipped.
Kubernetes support — apiVersion+kind detection, Flux rendering, and code
lenses — is on by default. Disable it to run as a generic YAML language server:
kubernetes:
enabled: false
vs. redhat/yaml-language-server
| yayamlls | redhat/yaml-language-server |
|---|
| Runtime | static Go binary | Node.js ≥ 12 |
| Diagnostics, completion, hover | yes | yes |
| Symbols, folding, links, code actions | yes | yes |
| Code lens | rendered output, diff | none |
| Kubernetes auto-detect | URL template from apiVersion+kind (toggleable) | yaml.kubernetesCRDStore (datreeio/CRDs-catalog) |
| Workspace config file | .yayamlls.yaml | editor settings only |
Flux HelmRelease / Kustomization rendering | via [flate][flate] | no |
Pluggable renderers (kustomize, helm, …) | config-declared subprocess | no |
| Formatting | no | yes (Prettier) |
Custom YAML tags (!Ref, etc.) | passthrough (skip validation) | yes |
| Diagnostic suppression comments | yes (# yayamlls-disable*) | yes |
| JSON Schema drafts | 04, 06, 07, 2019-09, 2020-12 | 04, 07, 2019-09, 2020-12 |
Install
Homebrew:
brew install home-operations/tap/yayamlls
Go:
go install github.com/home-operations/yayamlls/cmd/yayamlls@latest
Prebuilt binaries for linux/darwin/windows (amd64+arm64) are attached to
each GitHub release.
Flux rendering is built in via [flate][flate]; no separate install is needed.
Editor setup
yayamlls speaks LSP 3.16 over stdio. Put the binary on $PATH or pass
an absolute path.
Packaged extensions for VS Code and Zed live in editors/;
they download the matching yayamlls release binary automatically.
The snippets below are for editors with built-in LSP support.
Neovim
Use the built-in vim.lsp.config/vim.lsp.enable API (0.11+):
vim.lsp.config("yayamlls", {
cmd = { "yayamlls" },
filetypes = { "yaml" },
root_markers = { ".yayamlls.yaml", ".git" },
})
vim.lsp.enable("yayamlls")
With no marker found the server still attaches in single-file mode.
VSCode
Use the extension in editors/vscode; it downloads the
yayamlls binary on first activation, and exposes yayamlls.* settings. To build and run it locally, press F5
from that directory; to package a .vsix, run vsce package. See its
README for settings and publishing.
Helix
# ~/.config/helix/languages.toml
[language-server.yayamlls]
command = "yayamlls"
[[language]]
name = "yaml"
language-servers = ["yayamlls"]
Zed