mirror of
https://github.com/helix-editor/helix
synced 2024-11-10 10:34:45 +01:00
A few changes to make TSQ highlights better:
* A parsing error has been fixed in the grammar itself
* Previously tree-sitter-tsq did not parse the variables
in predicates like `(#set! injection.language "javascript")`
* Theme nodes as `tag`
* The newly added node to the parser (from the above fix) is
`variable` which takes over the `variable` capture from nodes
* Highlight known predicates as `function` and unsupported
predicates as `error`
* This may help when translating queries from nvim-treesitter.
For example `#any-of?` is a common one used in nvim-treesitter
queries but not implemented in Helix or tree-sitter-cli.
* Inject tree-sitter-regex into `#match?` predicates
9 lines
213 B
Scheme
9 lines
213 B
Scheme
((comment) @injection.content
|
|
(#set! injection.language "comment"))
|
|
|
|
((predicate
|
|
(predicate_name) @_predicate
|
|
(string) @injection.content)
|
|
(#eq? @_predicate "#match?")
|
|
(#set! injection.language "regex"))
|