VS Code extension for Grafana Alloy configuration files (River syntax). Provides syntax highlighting, auto-formatting, and validation.
Features
Syntax highlighting for .alloy, .river, and .conf.tmpl files
Auto-formatting via Format Document — fixes indentation, normalizes spacing around =, and properly nests blocks
Validation with two layers:
Built-in (WASM): Alloy's real Go parser compiled to WebAssembly — instant syntax validation on any OS, no dependencies needed
CLI (optional): If grafana-alloy is installed, runs grafana-alloy validate for full semantic checks (unknown components, invalid attributes, type errors)
Comment toggling (Ctrl+/), bracket matching, auto-closing pairs, and code folding
Extension Settings
Setting
Default
Description
alloy.binaryPath
grafana-alloy
Path to the grafana-alloy binary for CLI-based semantic validation.
Requirements
None — syntax highlighting, formatting, and basic validation work out of the box.
For full semantic validation, install Grafana Alloy (optional).
Release Notes
0.0.1
Initial release
Syntax highlighting for Alloy/River configuration files
Document formatting with proper indentation and spacing
WASM-based syntax validation using Alloy's Go parser
Optional CLI validation via grafana-alloy validate
Support for .alloy, .river, and .conf.tmpl file extensions