emahiro/b.log

Drastically Repeat Yourself !!!!

VSCode で CUE を書く

Overview

VSCode で CUE を書くときの設定です。

手順

CUE の Install

cuelang.org

上記の公式ドキュメントに書かれてる通りに進めればよいです。
僕個人は go コマンドでインストールするのが好みです。

CUE を入れたら cueimports を使うために PATH を通さないといけません。 Go で入れた場合は GoPath がそのまま cueimports の PATH として機能してくれます。

VSCode 側の設定

CUE の拡張をインストールします。

marketplace.visualstudio.com

以下の設定を設定に追記します。

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