Noir zero-knowledge language support for Zed.
- Syntax highlighting - Full highlighting for Noir keywords, types, operators, and ZK-specific constructs
- Language server integration - Powered by
nargo lspfor diagnostics, hover, go-to-definition, and completions - Document outline - Navigate functions, structs, traits, and modules
- Bracket matching - Including generic angle brackets
- Auto-indentation - Smart indentation for blocks and expressions
- Vim text objects - Function, class, parameter, and block selections
- Runnable detection - Detect
#[test]functions andmainfor one-click execution
- Open Zed
- Press
Cmd+Shift+X(orCtrl+Shift+Xon Linux) - Search for "Zoir"
- Click Install
Clone this repository into your Zed extensions directory:
git clone https://github.com/Hydepwns/zoir ~/.config/zed/extensions/zoirThe extension automatically manages the nargo LSP binary:
- PATH lookup - Uses
nargofrom PATH if available (respects noirup installations) - Automatic download - Downloads from GitHub releases if not found (macOS/Linux only)
Install nargo with noirup:
curl -L https://raw.githubusercontent.com/noir-lang/noirup/refs/heads/main/install | bash
noirupNoir does not provide pre-built Windows binaries. You must build from source:
- Install Rust
- Clone and build nargo:
git clone https://github.com/noir-lang/noir cd noir cargo build --release -p nargo
- Add
target\releaseto your PATH
Configure the language server in your Zed settings (~/.config/zed/settings.json):
{
"lsp": {
"nargo": {
"settings": {
"args": []
}
}
}
}To enable one-click test running, add task templates to ~/.config/zed/tasks.json:
[
{
"label": "Noir: Run Test",
"command": "nargo",
"args": ["test", "--exact", "$ZED_CUSTOM_run"],
"tags": ["noir-test"]
},
{
"label": "Noir: Execute",
"command": "nargo",
"args": ["execute"],
"tags": ["noir-main"]
}
]After adding these, you'll see run indicators next to #[test] functions and main.
Noir is a domain-specific language for zero-knowledge proofs. It enables writing private applications and verifiable computations.
Example:
fn main(x: Field, y: pub Field) {
assert(x != y);
}
#[test]
fn test_main() {
main(1, 2);
}Syntax highlighting is powered by tree-sitter-noir.
cargo build --release --target wasm32-wasip1MIT OR Apache-2.0