Skip to content

VS Code

View as Markdown

Install from Marketplace

  • YAML 1.1 & 1.2 diagnostics: Syntax errors, custom tags (yaml.customTags), style checks (yaml.style.flowMapping, yaml.style.flowSequence, yaml.keyOrdering), and unused anchor hints.
  • JSON Schema validation: Automatic matching from JSON Schema Store, Kubernetes & CRD catalog support, local/remote schemas via yaml.schemas, # yaml-language-server: $schema=... modelines, and $schema keys.
  • Status bar schema picker: Click the schema item in the status bar (or run YAML: Select schema) to assign schemas and choose schema versions.
  • Ecosystem extension API: Supports schema contributors and json-schema: document content for extensions such as Ansible, Docker Compose, and Helm.
  • Completion, hover, and formatting: Schema-driven keys, values, snippets, schema-source tooltips, anchor/alias hover previews, whole-document formatting, and on-type indentation.
  • Navigation and refactoring: Document outline symbols, folding ranges, selection ranges, clickable links, go to anchor definition, anchor rename, code actions, and schema CodeLens.
  • Check workspace: Run oxyaml: Check workspace (oxyaml.checkWorkspace) to validate every YAML file in your workspace—including unopened files—using oxyaml check --format json and view all diagnostics in the Problems panel.

Commands

Command Title Description
yaml.select.json.schema YAML: Select schema Pick or switch the JSON Schema (and version) for the active YAML file.
oxyaml.checkWorkspace oxyaml: Check workspace Validate all YAML files in open workspace folders (including unopened files) and publish diagnostics to Problems.
oxyaml.restartServer oxyaml: Restart server Restart the oxyaml language server.
oxyaml.showOutput oxyaml: Show output Open the oxyaml log output channel.
oxyaml.showVersion oxyaml: Show version Print the active oxyaml binary version.

Troubleshooting

  • Using a custom binary (oxyaml.path): Set oxyaml.path in a trusted workspace to point to a local oxyaml executable instead of the bundled binary (ignored in untrusted workspaces for security). Run oxyaml: Show version to confirm which binary is active.
  • Output channel: Run oxyaml: Show output (or open Output → oxyaml in the panel) to inspect startup logs, configuration messages, and errors.
  • LSP trace logging: Set oxyaml.trace.server (or yaml.trace.server) to "messages" or "verbose", then inspect the Output → oxyaml Trace channel to view raw LSP requests, responses, and notifications.