Skip to content

YAML tooling in Rust

The fast YAML
language server.

A drop-in replacement for yaml-language-server. Keep your settings and schemas. Run it in your editor and in CI without Node.js.

brew install marwanvx/tap/oxyaml
oxyaml check .Full capture
.github/workflows/ci.yml
4:3
error Missing property "runs-on".
10:26
error Incorrect type. Expected "number".
5:5
error Property run-on is not allowed.
config.yaml
4:1
error Flow sequence in block collection must be sufficiently indented and end with a ]
Checked 3 files4 errors

Benchmarks

From edit to diagnostics

oxyaml yaml-language-server

50,000 lines

Edit → diagnostics
oxyaml 2.6 ms400× faster
yaml-language-server 1,040.2 ms
Warm open → diagnostics
oxyaml 102.9 ms10× faster
yaml-language-server 1,064.1 ms
Peak memory
oxyaml 91.4 MB15× less
yaml-language-server 1,345.1 MB

Measured on GitHub Actions with the same YAML files and schema. See methodology and results

Capabilities

From your first key to CI

JSON Schema

Validate against the schemas you already use.

Use SchemaStore, Kubernetes schemas and custom resource definitions. Associate local or remote schemas with file globs or an inline modeline.

Configure schemas

Completion & hover

Suggest keys and values from the active schema and see descriptions at the cursor.

Formatting

Format whole documents and get indentation as you type with your yaml.format.* settings.

Code actions & navigation

Apply quick fixes, jump through document symbols, and rename an anchor and its aliases together.

oxyaml check

Check files and directories and report diagnostics as text, JSON, or SARIF.

Bounded validation

Limits on alias expansion and schema validation bound work on hostile YAML and schemas.

Migration

Switch from Red Hat YAML

Read the migration guide
  1. Install oxyaml. Keep your existing yaml.* settings and modelines.
  2. Disable Red Hat YAML for the workspace. In VS Code, accept the prompt from oxyaml.
  3. Update the default formatter if you set it to Red Hat YAML. Choose marwanvx.oxyaml.

Continuous integration

Check YAML before it ships

GitHub Actions
name: Check YAML
on: [push, pull_request]
permissions:
  contents: read
jobs:
  yaml:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
      - uses: marwanvx/oxyaml@v1 # moves to the latest 1.x release
        with:
          format: text
pre-commit
repos:
  - repo: https://github.com/marwanvx/oxyaml-pre-commit
    rev: v1.0.1
    hooks:
      - id: oxyaml-check

Open source

Support oxyaml