[PR #6386] feat(highlight): add nix syntax highlighting #11870

Closed
opened 2026-02-16 18:16:48 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/6386

State: closed
Merged: Yes


Summary

  • Add tree-sitter parser config for Nix files
  • Use ast-grep WASM (pinned SHA) as temporary source until official release
  • Include highlights.scm and locals.scm from nvim-treesitter

Why ast-grep?

Official tree-sitter-nix doesn't publish WASM binaries (nix-community/tree-sitter-nix#66 open 1.5+ years). ast-grep is a reliable alternative:

  • 11k+ stars, actively maintained
  • WASM compiled by main maintainer
  • Commit SHA pinned for stability

When upstream publishes official WASM, it's a one-line URL swap.

Closes #6385

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/6386 **State:** closed **Merged:** Yes --- ## Summary - Add tree-sitter parser config for Nix files - Use ast-grep WASM (pinned SHA) as temporary source until official release - Include highlights.scm and locals.scm from nvim-treesitter ## Why ast-grep? Official tree-sitter-nix doesn't publish WASM binaries (nix-community/tree-sitter-nix#66 open 1.5+ years). ast-grep is a reliable alternative: - 11k+ stars, actively maintained - WASM compiled by main maintainer - Commit SHA pinned for stability When upstream publishes official WASM, it's a one-line URL swap. Closes #6385
yindo added the pull-request label 2026-02-16 18:16:48 -05:00
yindo closed this issue 2026-02-16 18:16:48 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11870