diff --git a/website/docs/editor-support.md b/website/docs/editor-support.md index e3651e2a4..d8ea17427 100644 --- a/website/docs/editor-support.md +++ b/website/docs/editor-support.md @@ -5,6 +5,23 @@ title: Editor Support We provide a [JSON schema file](https://github.com/project-dalec/dalec/blob/main/docs/spec.schema.json) to integrate with your editor. This will help validate your yaml files and provide intellisense for the spec. +Alternatively, the schema can be fetched from the dalec frontend starting with v0.20: + +### With an existing spec + +```bash +docker buildx build --call dalec.schema -< path/to/spec +``` + +This loads the version of dalec set in the "syntax" directive of the spec file. + +### Without a spec + +```bash +# Provide an empty spec to stdin and set the buildkit frontend parser with the `BUILDKIT_SYNTAX` build arg. +docker buildx build --call dalec.schema --build-arg BUILDKIT_SYNTAX=ghcr.io/project-dalec/frontend:latest -<<<'{}' +``` + ## VSCode For VSCode you'll need to use a YAML plugin that supports JSON schemas, such as [YAML Support by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml).