Zed extension with syntax highlighting for zlang (.zl).
- Language registration for
.zl - Tree-sitter grammar (
grammar.js) - Highlight queries (
languages/zlang/highlights.scm) - Bracket matching and indent queries
- String interpolation highlighting for
${...}(escape with\${})
- Clone repo:
git clone https://github.com/zlangdevs/zed-zlang- Open Zed.
- Run command:
zed: install dev extension - Select the
zed-zlangfolder.
For local dev extension installs, keep grammar source pointing to this GitHub repo and pin to a commit SHA:
[grammars.zlang]
repository = "https://github.com/zlangdevs/zed-zlang"
rev = "<commit_sha>"Use any commit from this repository.
After pushing this repo to GitHub, switch grammar source to Git URL + commit SHA:
[grammars.zlang]
repository = "https://github.com/zlangdevs/zed-zlang"
rev = "<commit_sha>"Create test.zl:
use std
fun main() >> i32 {
i32 a = <i32> {
1 + 2
};
printf("%d\n", a);
return 0;
}
Open file in Zed and select language Zlang.