#7

Zed editor extension for Tov

Openaleclarsonopened 1mo ago

I put together a Zed extension for Tov: https://github.com/aleclarson/zed-tov-plugin

It ships a Tree-sitter grammar that inherits tree-sitter-typescript and layers Tov's additions on top:

  • try expressions (try f(), try new X(), try await f(), try (expr))
  • throws clauses on signatures and (a: T) => U throws E function types
  • inout parameters and & arguments
  • int, f64, f32, i8–u64, bool types

On top of that it adapts Zed's TypeScript queries for highlighting, brackets, indentation, outline, text objects, comment/JSDoc injections, and test("name", ...) runnable detection. Anything TypeScript parses still parses — tov check stays the source of truth for what's actually valid.

The publishing PR to the Zed extension registry is open: https://github.com/zed-industries/extensions/pull/7963

Happy to transfer the repo to you / a Tov org, or upstream the grammar here if you'd rather own it. The grammar may also help with #4 — GitHub's syntax highlighting is Tree-sitter-based for the languages linguist supports that way.

Activity

0

No activity yet.