Editor Setup
VS Code Extension
Section titled “VS Code Extension”The official Achronyme extension adds full language support to Visual Studio Code.
Features
Section titled “Features”- Syntax highlighting — Keywords, builtins, field literals (
0p...), BigInt literals (0i256x...), operators, strings - Real-time diagnostics — Parse errors as you type, powered by the
ach-lsplanguage server - Hover documentation — Hover any keyword or builtin function to see its signature, parameters, and examples
- Autocompletion — Keywords, all 43 builtin functions with snippet placeholders, and 7 code snippets
- Run button — One-click execution of
.achfiles from the editor title bar
Install from Source
Section titled “Install from Source”# Clone the editor repositorygit clone https://github.com/achronyme/achronyme-editor.gitcd achronyme-editor
# Build the LSP servercargo build --release -p ach-lsp
# Place the binary in the extension's bin directorymkdir -p editors/vscode/bincp target/release/ach-lsp editors/vscode/bin/
# Install extension dependencies and buildcd editors/vscodenpm cinpm run buildThen open VS Code with the extension in development mode:
code --extensionDevelopmentPath=editors/vscodeCLI Auto-Download
Section titled “CLI Auto-Download”When you click the Run button on a .ach file, the extension looks for the ach CLI binary in this order:
- The path configured in
achronyme.executablePath ~/.achronyme/bin/ach(auto-download location)- System PATH
If not found, the extension offers to download the correct binary for your platform (Linux x86_64, macOS x86_64/ARM64, Windows x86_64) from GitHub Releases.
The extension also checks for updates on activation and prompts you when a new version is available.
Settings
Section titled “Settings”| Setting | Default | Description |
|---|---|---|
achronyme.executablePath | "" | Path to the ach CLI binary. Leave empty for auto-detection. |
achronyme.lspPath | "" | Path to the ach-lsp binary. Leave empty to use the bundled binary. |
Code Snippets
Section titled “Code Snippets”The extension provides these snippets via autocompletion:
| Prefix | Expands to |
|---|---|
fn | fn name(params) { ... } |
prove | prove { ... } |
for | for item in collection { ... } |
forr | for i in 0..n { ... } |
if | if condition { ... } |
ife | if condition { ... } else { ... } |
while | while condition { ... } |
LSP Capabilities
Section titled “LSP Capabilities”The language server (ach-lsp) provides:
| Feature | Status |
|---|---|
| Diagnostics (parse errors) | Supported |
| Hover documentation | Supported (49 keywords + builtins) |
| Autocompletion | Supported (keywords, builtins, snippets) |
| Go-to-definition | Not yet |
| Find references | Not yet |
| Rename | Not yet |
| Formatting | Not yet |
Diagnostics update in real-time as you type — no need to save the file first.
Other Editors
Section titled “Other Editors”The LSP server communicates over stdio and follows the Language Server Protocol, so it can be integrated with any editor that supports LSP (Neovim, Helix, Zed, etc.). Point your editor’s LSP config to the ach-lsp binary.