https://github.com/johnallen3d/vscode-cue-fmt
Format CUE files using cue fmt
https://github.com/johnallen3d/vscode-cue-fmt
cue formatter vscode-extension
Last synced: 8 months ago
JSON representation
Format CUE files using cue fmt
- Host: GitHub
- URL: https://github.com/johnallen3d/vscode-cue-fmt
- Owner: johnallen3d
- License: apache-2.0
- Created: 2021-12-18T03:51:34.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-11-03T15:15:30.000Z (over 3 years ago)
- Last Synced: 2025-10-20T21:41:28.504Z (8 months ago)
- Topics: cue, formatter, vscode-extension
- Language: TypeScript
- Homepage: https://marketplace.visualstudio.com/items?itemName=jallen7usa.vscode-cue-fmt
- Size: 85.9 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# vscode-cue-fmt
Format CUE files using `cue fmt`.
## Setup
CUE must be installed and `cue` must be on the users `$PATH`.
```sh
# MacOS
brew install cue-lang/tap/cue
# more info: https://cuelang.org/docs/install/
```
Enable "format on save" VS Code setting.
```jsonc
// settings.json
"editor.formatOnSave": true
```
## Why?
I've grown accustomed to the format on save feature that's enabled by default with the [NeoVim CUE plugin that I use](https://github.com/jjo/vim-cue) and was dissapointed to find that the existing [CUE extension for VS Code](https://github.com/cue-sh/vscode-cue/) did not support this feature. Eventually that extension will support formatting via LSP but there is no telling when CUE LSP will be available. In the meantime this should do the trick.
## Status
**Alpha** -- I've never written TypeScript let alone a VS Code extension. The code in this extension is _extremely_ niave and has little to no error handling. Use at your own risk.