feat(editors): tree-sitter highlighting for Helix and Neovim, Zed coming soon #251

Merged
abiwab merged 2 commits from feat/editors-tree-sitter into dev/1.6 2026-11-25 15:55:12 +01:00
Owner

Step T2 of the IDE satellites plan, plus the Zed announcement in the docs.

Helix and Neovim: tree-sitter highlighting

Both build tree-sitter-gram at the same pinned commit (854cfed, tag v0.1.0).

  • Neovim, with no plugin: editors/neovim/build-parser.sh builds parser/gram.so with a C compiler and copies the queries into the Neovim config; editors/neovim/gram-treesitter.lua starts highlighting and section folds. gram.lua (LSP) is unchanged. Works with Neovim 0.11 and 0.12.
  • Helix: a [[grammar]] block in languages.toml; the comment gives the fetch/build commands and the copy of the queries, which Helix does not install.
  • Found in the container (Helix 25.07.1), now in the docs: building a grammar needs a C++ compiler (c++), even for a grammar written in C; hx --grammar fetch fetches every grammar unless use-grammars limits it; hx --health reports the parser even when none was built.

Checks

  • editors.test.ts: contracts for the new files, and Helix and Neovim pinned to the same repository and commit.
  • Smoke (editors/smoke/run.sh): Neovim builds the grammar and checks captures (section header, ingredient, quantity, reference) and a section fold headless; Helix builds gram.so and checks Highlight queries: ✓. The image gains gcc gcc-c++.
  • Tested with Neovim 0.11.6 (container) and 0.12.6, Helix 25.07.1, Emacs (unchanged).

Docs (en + fr)

  • Matrix: Neovim "full with Tree-sitter", Helix "full (Tree-sitter)", and a Zed row, "official, coming soon".
  • Neovim and Helix sections; a Zed section under official support, until the extension (zed-gram) is accepted in Zed's registry after the 1.6.0 release.

No changeset: editors/ is not published and @gram-lang/docs is private.

Step T2 of the IDE satellites plan, plus the Zed announcement in the docs. ## Helix and Neovim: tree-sitter highlighting Both build [tree-sitter-gram](https://github.com/gram-lang/tree-sitter-gram) at the same pinned commit (`854cfed`, tag `v0.1.0`). - **Neovim**, with no plugin: `editors/neovim/build-parser.sh` builds `parser/gram.so` with a C compiler and copies the queries into the Neovim config; `editors/neovim/gram-treesitter.lua` starts highlighting and section folds. `gram.lua` (LSP) is unchanged. Works with Neovim 0.11 and 0.12. - **Helix**: a `[[grammar]]` block in `languages.toml`; the comment gives the fetch/build commands and the copy of the queries, which Helix does not install. - Found in the container (Helix 25.07.1), now in the docs: building a grammar needs a C++ compiler (`c++`), even for a grammar written in C; `hx --grammar fetch` fetches every grammar unless `use-grammars` limits it; `hx --health` reports the parser even when none was built. ## Checks - `editors.test.ts`: contracts for the new files, and Helix and Neovim pinned to the same repository and commit. - Smoke (`editors/smoke/run.sh`): Neovim builds the grammar and checks captures (section header, ingredient, quantity, reference) and a section fold headless; Helix builds `gram.so` and checks `Highlight queries: ✓`. The image gains `gcc gcc-c++`. - Tested with Neovim 0.11.6 (container) and 0.12.6, Helix 25.07.1, Emacs (unchanged). ## Docs (en + fr) - Matrix: Neovim "full with Tree-sitter", Helix "full (Tree-sitter)", and a Zed row, "official, coming soon". - Neovim and Helix sections; a Zed section under official support, until the extension ([zed-gram](https://github.com/gram-lang/zed-gram)) is accepted in Zed's registry after the 1.6.0 release. No changeset: `editors/` is not published and `@gram-lang/docs` is private.
abiwab merged commit e7c0e988b6 into dev/1.6 2026-11-25 15:55:12 +01:00
abiwab deleted branch feat/editors-tree-sitter 2026-11-25 15:55:17 +01:00
Sign in to join this conversation.
No description provided.