Tree-sitter grammar for the ZZ programming language.
Docs: https://zz-lang.pages.dev.
bun install
bunx tree-sitter generate # builds src/
bunx tree-sitter test # runs test/corpusNeovim (nvim-treesitter):
vim.filetype.add({ extension = { zz = "zz" } })
-- point the `zz` parser at this repo, then `:TSInstall zz`The queries/ folder (highlights, folds, indents) is mirrored in
../nvim/nvim-zz/queries/zz/ — keep both in sync.
GitHub's language breakdown comes from
github-linguist/linguist.
To make .zz files count as ZZ:
- Fork
github-linguist/linguist. - In
lib/linguist/languages.yml, add (alphabetical, underZ):
ZZ:
type: programming
color: "#7B61FF"
extensions:
- ".zz"
tm_scope: source.zz
ace_mode: text
language_id: 123456789 # request a real id in your PR description- Add samples:
samples/ZZ/hello.zz,samples/ZZ/server.zz(take them fromtest/corpus/basics.txtsources above). - Open the PR titled "Add ZZ language". Linguist requires the language to
be in use on GitHub already — push
tree-sitter-zzand a few.zzrepos first, and link them in the PR.
Notes:
colormust not collide with an existing language color; if CI complains, pick another and updatevscode/vscode-zzicon + docs.language_idmust be unique — ask the maintainers for one in the PR.
MIT