Skip to content

Repository files navigation

zed-zlang

Zed extension with syntax highlighting for zlang (.zl).

What is included

  • 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 \${})

Install (local dev extension)

  1. Clone repo:
git clone https://github.com/zlangdevs/zed-zlang
  1. Open Zed.
  2. Run command: zed: install dev extension
  3. Select the zed-zlang folder.

Local development note

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.

Publishing-ready setup

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>"

Quick check

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.

About

Zlang syntax highlight extension for Zed

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages