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/{group:-core}/{kind@L}_{version@L}.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.
Command line
yayamlls validate (alias lint) validates files for CI or ad-hoc checks,
resolving schemas exactly as the editor does. Pass files or directories
(directories are walked for *.yaml/*.yml):
yayamlls validate kubernetes/ # whole tree
yayamlls validate app/helmrelease.yaml ks.yaml
Diagnostics print ruff-style, path:line:col: source message, and the exit
code is 1 if any error was reported, 2 on a usage/IO error, else 0.
--root <dir> pins the workspace root for .yayamlls.yaml (default:
auto-detect).
Add --render to also render Flux HelmRelease/Kustomization documents via
[flate][flate] and validate the rendered manifests — the apply-time check, not
just the source files:
yayamlls validate --render kubernetes/
Rendering shells out to git/helm, so it is opt-in and slower than raw
validation; the render tree is built once per run and reused across documents,
so validating a whole directory in one invocation is far cheaper than
file-by-file. A render that can't resolve a document (e.g. a component base
template with unsubstituted ${vars}) is reported as a warning and does not
fail the run; only schema violations in rendered output do.
Editor setup