README.md
zed-extension
Reference Zed extension for Strata, per proposal/14-toolchain.md §18
(D-066): "Zed is the reference client ... its extension surface is small
(extension.toml pinning the grammar rev, config.toml, .scm queries, one
WASM shim wiring language_server_command)."
This is intentionally minimal — a reference extension proving the tree-sitter
grammar is consumable by a real editor extension surface, not a polished
package. It provides syntax highlighting, bracket matching, indentation, and
outline/symbol navigation from tree-sitter-strata. It does not wire
strata-ls (language_server_command) yet; that is Tier-A strata-ls work
tracked separately in the roadmap (11-roadmap.md Phase 1), not part of this
grammar-conformance pass.
Layout
extension.toml— extension manifest;[grammars.strata]pins the grammar repository and revision (see the caveat below),[languages.strata]registers the language.languages/strata/config.toml— language config: comment syntax, bracket auto-close, tab size.languages/strata/highlights.scm— syntax highlighting queries, kept in sync withtree-sitter-strata/queries/highlights.scm.languages/strata/brackets.scm,outline.scm,indents.scm— minimal bracket-matching, symbol-outline, and indent queries.
Grammar repository caveat
D-066 calls for "one tree-sitter-strata repo under the project org." Today
tree-sitter-strata/ is a subdirectory of this monorepo. Zed clones a
grammar's repository/rev and expects grammar.js/src/parser.c at that
repository's root, so extension.toml's [grammars.strata] currently points
at the monorepo as a placeholder — installing this extension in a real Zed
build will not resolve the grammar until tree-sitter-strata is split into
its own top-level repository (or Zed's extension format grows a subpath
option). This extension is otherwise structurally complete and its queries
are validated against the grammar directly (see tree-sitter-strata/'s test
suite), so the split is a packaging step, not a rewrite.
Validating the queries without a Zed install
| 1 | cd tree-sitter-strata |
| 2 | npm install |
| 3 | npm run generate |
| 4 | node_modules/.bin/tree-sitter query ../zed-extension/languages/strata/highlights.scm \ |
| 5 | crates/strata-syntax/tests/fixtures/arbiter.strata |
(or any other .scm file / fixture under crates/strata-syntax/tests/fixtures/).