Skip to content
Discussion options

You must be logged in to vote

No, Helix highlights exclusively through Tree-sitter. There is no regex or TextMate grammar engine in it, and it is not a config toggle you can flip.

If a language has no Tree-sitter grammar, you have two realistic options:

  1. Point Helix at an existing tree-sitter grammar for it: add a [[grammar]] entry plus a [[language]] block in languages.toml, run hx --grammar fetch and hx --grammar build, and drop a runtime/queries/<lang>/highlights.scm so it knows what to color.
  2. Leave it unhighlighted.

Porting a VSCode/TextMate regex grammar over is not supported, so there is no low-effort regex path. The upside is that once a tree-sitter grammar exists, the highlighting is far more accurate than re…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@Nikita0x
Comment options

Answer selected by Nikita0x
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants