db7ba1dff2
ci / build (ubuntu) (push) Has been cancelled
ci / unit + fmt (push) Has been cancelled
ci / examples (push) Has been cancelled
ci / goldens + tools (push) Has been cancelled
ci / apps (push) Has been cancelled
ci / selfhost smoke (push) Has been cancelled
ci / macos smoke (push) Has been cancelled
ci / windows smoke (push) Has been cancelled
ci / CI gate (push) Has been cancelled
selfhost-loop / bootstrap determinism (push) Has been cancelled
bux-lsp 0.17 publishes in-process diagnostics on open/change/save so editors show red squiggles for lex/parse/type errors in the live buffer. VS Code client discovers tools/bux-lsp, adds status bar/restart, richer syntax/snippets, and docs (docs/LSP.md) for forum/editor setup.
Bux Language Support for VS Code
Syntax highlighting, snippets, editor defaults, and Language Server Protocol integration for the Bux programming language.
Features
| Area | What you get |
|---|---|
| Syntax | Keywords, types, f"..." interpolation, raw `...` strings, C-strings, macros (macro! / name!()), attributes (@[Checked]), numbers (hex/bin/oct + suffixes), lifetimes |
| Snippets | main, func, struct, enum, match, interface, extend, macro, checked, … |
| LSP | Live error underlines (red squiggles on edit), completion, hover, go-to-definition, references, rename, document/workspace symbols, call hierarchy, type hierarchy, go-to-implementation |
| Editor | Bracket colorization, smart indent / on-enter, fold regions (// region) |
| Build | buxc problem matcher for Tasks |
Requirements
- VS Code ≥ 1.85
bux-lspbinary (from this repo):
# from the Bux repository root
make lsp
# → tools/bux-lsp
The extension auto-discovers the server in this order:
- Setting
bux.lsp.path(absolute, relative, or command name) tools/bux-lspunder any workspace folder (and parent folders for monorepos)bux-lspon yourPATH
Install (development)
cd vscode
npm install
npm run compile
# Launch Extension Development Host: F5 in VS Code,
# or install the folder as an extension:
code --install-extension .
# or package:
npx @vscode/vsce package
code --install-extension bux-lang-0.2.0.vsix
Symlink into your extensions dir (Linux):
ln -sfn "$(pwd)/vscode" ~/.vscode/extensions/bux-lang.bux-lang-0.2.0
Commands
| Command | Description |
|---|---|
| Bux: Restart Language Server | Stop and start bux-lsp |
| Bux: Stop Language Server | Disconnect the client |
| Bux: Show Output Channel | Open the Bux log |
Status bar item Bux (left): click to restart. Red = missing binary / start failure.
Settings
| Setting | Default | Description |
|---|---|---|
bux.lsp.enabled |
true |
Master switch for the language server |
bux.lsp.path |
"bux-lsp" |
Path or command for the server binary |
bux-lsp.trace.server |
off |
LSP wire trace (off / messages / verbose) |
LSP capabilities (bux-lsp)
Provided by tools/lsp_server.nim (see make lsp / make test-lsp):
textDocument/completion,hover,definition,references,renamedocumentSymbol,workspace/symbol- Call hierarchy, type hierarchy,
implementation - Diagnostics on open/save (via analyzer /
buxc)
Troubleshooting
- Status bar shows error → run
make lspand ensuretools/bux-lspexists and is executable. - Bux: Show Output Channel for client logs.
- Set
"bux-lsp.trace.server": "verbose"for JSON-RPC traffic. - Confirm language mode is Bux for
.buxfiles (status bar language indicator).
License
MIT — same as the Bux project.