Language Support for CUE
- Syntax Highlighting
- Formatting (based on
cue fmt
) - Naive Lint (based on
cue vet
) - Evaluation Preview (based on
cue eval
)
- Install CUE SDK, see https://cuelang.org/docs/install/
To use VSCode command quickly, press cmd + shift + p
to open Command Palette
. Search the command name and then press enter.
Same as other formatters, for instance, use VSCode command Format Document
.
Use command Cue: Lint Current File
to lint.
Or configure {"cue.lintOnSave": "file"}
to lint automatically when file saved (default on).
same as cue eval -e xxx
Use command Cue: Evaluate ...
. It will open an preview panel to show the evaluation result.
You can input expressions, or select different output types that CUE supported.
{
"cue.lintOnSave": "file", // or "off"
"cue.lintFlags": [], // e.g. ["-c"]
"cue.moduleRoot": "${workspaceFolder}" // used to resolve modules
}
See DEV.md
Project | LICENSE |
---|---|
shikijs/shiki | MIT |
golang/vscode-go | MIT |
cue-lang/cue | Apache-2.0 |