Skip to content
Unverified: This page has not yet been anchored to automated code tests.

GitHub Linguist — Vox language

GitHub uses Linguist to classify repository languages for stats, syntax highlighting, and search. Vox source (.vox) should appear as Vox, not as generic text or another language.

Root .gitattributes marks every .vox file:

*.vox text eol=lf linguist-language=Vox linguist-detectable=true
  • linguist-language=Vox — force the display name in GitHub language breakdowns.
  • linguist-detectable=true — include .vox in language statistics (override Linguist heuristics that might skip small or mixed extensions).

This is effective on GitHub once the attributes file is on the default branch. It does not require an upstream Linguist merge, but upstream registration improves highlighting defaults and cross-repo consistency.

Linguist accepts new languages when they have a real grammar, reasonable adoption, and maintainer responsiveness. Vox already ships a Tree-sitter grammar at tree-sitter-vox.

Ensure tree-sitter-vox builds cleanly:

Terminal window
cd tree-sitter-vox
npm install
npx tree-sitter generate
npx tree-sitter test
  1. Fork github/linguist.

  2. Add vendor/grammars/tree-sitter-vox as a git submodule pointing at this repo’s tree-sitter-vox directory (or the published mirror once split).

  3. Edit languages.yml with a new entry:

    Vox:
    type: programming
    color: "#5B4FCF"
    extensions:
    - ".vox"
    tm_scope: source.vox
    ace_mode: text
    codemirror_mode: null
    codemirror_mime_type: text/x-vox
    language_id: <next free id — check linguist languages.yml>
  4. Add a sample under samples/Vox/ (≥25 lines of representative .vox from examples/golden/).

  5. Run Linguist’s test suite locally: script/cibuild or bundle exec rake test per upstream docs.

  • Title: Add Vox language
  • Link to tree-sitter-vox and the Vox project site.
  • Note that the canonical compiler is vox-compiler (recursive descent); Tree-sitter is for highlighting and editor tooling.
  • Respond to reviewer feedback on sample size, grammar conflicts, and language_id allocation.
  • Remove or relax repo-level linguist-language overrides only if upstream detection is reliable.
  • Keep .gitattributes text eol=lf for cross-platform line endings regardless of Linguist status.