lugoues / vscode-cuelang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vscode-cuelang README

Language Support for CUE

Features

  • Syntax Highlighting
  • Formatting (based on cue fmt)
  • Naive Lint (based on cue vet)
  • Evaluation Preview (based on cue eval)

Prerequisite

Usage

To use VSCode command quickly, press cmd + shift + p to open Command Palette. Search the command name and then press enter.

Format

Same as other formatters, for instance, use VSCode command Format Document.

Lint

Use command Cue: Lint Current File to lint.

Or configure {"cue.lintOnSave": "file"} to lint automatically when file saved (default on).

Evaluation Preview

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.

Configuration

{
  "cue.lintOnSave": "file", // or "off"
  "cue.lintFlags": [], // e.g. ["-c"]
  "cue.moduleRoot": "${workspaceFolder}" // used to resolve modules
}

Dev

See DEV.md

Credits

Project LICENSE
shikijs/shiki MIT
golang/vscode-go MIT
cue-lang/cue Apache-2.0

About

License:MIT License


Languages

Language:TypeScript 91.1%Language:JavaScript 6.7%Language:Makefile 2.2%