zed-quint
A Zed extension for the Quint specification language. Port of the official VS Code Quint extension.
Activates on .qnt files and inside ```quint fenced code blocks
in markdown.
Features
- Syntax highlighting — keywords, storage modifiers, builtin types,
constants, operators, strings, numbers, comments. Plus capitalized
identifiers (
OCR,IdentSuccess,Camera) highlighted as types / sum constructors, prime-suffixed identifiers (x'), thematchkeyword, theMaptype, and the->operator (all missing from the upstream TextMate grammar). - Diagnostics, hover, go-to-definition, completions, rename — via
@informalsystems/quint-language-server, the same LSP server the VS Code extension uses. Ifquint-language-serveris on yourPATH(e.g. vianpm install -g @informalsystems/quint-language-server), that copy is used. Otherwise the extension installs the latest version into its own working directory on first open and launches it via Node. - Markdown injection — highlighting inside
```quintfenced code blocks, including literate specs usinglmt-style info strings like```quint digger.qnt +=(Zed matches the first word).
The Tree-sitter grammar driving the highlighter is intentionally shallow (token-level only); deeper editor features (folding, outline) come from the LSP.
Install
Once published to the Zed extension registry: cmd-shift-p →
zed: extensions → search for "Quint" → install.
Install (dev)
git clone https://github.com/zdavison/zed-quint.git
cd zed-quintThen in Zed: cmd-shift-p → zed: install dev extension → pick the
zed-quint directory. Zed will:
- clone the grammar at
the
revpinned inextension.tomland compile it to wasm, - compile the Rust extension shim (
src/quint.rs) to wasm, and - on first open of a
.qntfile, install@informalsystems/quint-language-servervia npm (skipped if the binary is already on yourPATH).
Layout
extension.toml # extension manifest, grammar pin, language server registration
Cargo.toml # Rust extension crate (cdylib targeting wasm32-wasip1)
src/quint.rs # launches quint-language-server (PATH first, npm fallback)
languages/quint/config.toml # path_suffixes, comment markers, brackets, autoclose
languages/quint/highlights.scm # tree-sitter highlight queriesIterating locally
- Edits to
languages/quint/*.scmorconfig.toml→cmd-shift-p→zed: reload extensions. - Edits to
src/quint.rsorCargo.toml→ reload extensions (Zed rebuilds the wasm). - Edits to the grammar → push a new commit to
tree-sitter-quint, bump therevinextension.toml, then reload. If you change the grammar repository URL, deletegrammars/first — Zed refuses to repoint an existing clone.
License
MIT. See LICENSE.