Language support for WX, a Rust-inspired language that compiles directly to WebAssembly, in the Zed editor.
- Syntax highlighting (tree-sitter grammar)
- Diagnostics, hover, completions, and formatting via
wx lsp— the same language server the VS Code extension uses
Not yet published to Zed's extension registry — install it as a dev extension (below) to try it.
The grammar is an early-stage MVP: it gives real structure to top-level items (fn, struct, trait, impl, etc. — enough for highlighting and bracket matching), but signatures and bodies are parsed as generic balanced-token groups rather than a full expression grammar. It's been checked against every .wx file in the main wx repo with zero parse errors, but it isn't a validating parser.
This extension talks to the wx CLI's language server — it doesn't bundle a binary. Install wx and make sure it's on your PATH:
npm install -g @wx-lang/clior build it from source (see the main README).
- Clone this repo.
- Install Rust via rustup (not your OS package manager) and add the WASM target:
rustup target add wasm32-wasip1. - In Zed: open the extensions panel → Install Dev Extension → select this folder.
- Zed compiles the extension and grammar the first time (may take a minute). Open a
.wxfile afterwards to try it.
If wx isn't on your PATH, or you want to point at a specific install, use Zed's standard per-language-server override in settings.json:
"lsp": {
"wx": {
"binary": {
"path": "/path/to/wx",
"arguments": ["lsp"]
}
}
}Found a bug or missing feature? Open an issue.