Adds Rugo language support to
Zed. Rugo is a Ruby-inspired language that compiles to a
native binary via Go. Files with the .rugo extension are recognised.
- Syntax highlighting via a local
tree-sitter-rugogrammar (forked fromtree-sitter-rubyv0.23.1 with Rugo-specific keyword tweaks). - Bracket matching, auto-indent, outline and text-object queries.
- Snippets covering Rugo idioms:
def,fn,struct,if/elsif,case,for,while,try/or,spawn,parallel,use/import/require,embed,rats, etc. - Runnable detection for
ratsandbenchblocks. - Tasks for
rugo run,rugo emit,rugo build, andrugo ratsagainst the current file.
- No language server. Rugo does not ship an LSP, so completion, diagnostics, hover, and code actions are not provided.
- No debug adapter. Rugo compiles to a native binary; debugging is done with standard Go/native tooling outside of Zed.
extension.toml # extension metadata + local grammar reference
Cargo.toml # minimal Rust crate (no LSP plumbing)
src/rugo.rs # tiny zed::Extension impl
languages/rugo/ # language config + tree-sitter queries + snippets
tree-sitter-rugo/ # vendored grammar source (source of truth)
grammars/rugo/ # generated at build time by scripts/setup-grammar.sh
scripts/setup-grammar.sh # bootstraps grammars/rugo/ from tree-sitter-rugo/
The grammars/ directory is git-ignored. The grammar source is tracked under
tree-sitter-rugo/ and materialised into grammars/rugo/ on demand.
- Clone this repository.
- Run
./scripts/setup-grammar.sh. This recreatesgrammars/rugo/as a self-contained git repo with a deterministic commit SHA so that Zed's grammar-checkout step succeeds offline. - In Zed, run
zed: install dev extensionand select this directory.
Re-run scripts/setup-grammar.sh whenever you edit anything under
tree-sitter-rugo/. If the deterministic SHA changes, the script prints the
new value — update [grammars.rugo].rev in extension.toml accordingly.
Zed's extension build pipeline expects each declared grammar to live in
grammars/<grammar_name>/ as a git clone whose origin URL matches the
repository field in extension.toml. We satisfy that with a placeholder
file:// URL and a deterministic local commit instead of relying on a remote
host, keeping the grammar fully local.
The extension itself is Apache-2.0 (see LICENSE-APACHE). The vendored grammar
retains its upstream MIT license (see tree-sitter-rugo/LICENSE).