mirror of https://github.com/helix-editor/helix
Add highlight support for tree-sitter-query language (tsq) (#845)
* add submodule on tree-sitter/tree-sitter-tsq mark tsq submodule as shallow * add tree-sitter-tsq to languages * add highlight queries for tsq * Update .gitmodules Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>pull/853/head
parent
43465926be
commit
e069fb9dea
@ -0,0 +1 @@
|
||||
Subproject commit b665659d3238e6036e22ed0e24935e60efb39415
|
@ -0,0 +1,46 @@
|
||||
; mark the string passed #match? as a regex
|
||||
(((predicate_name) @function
|
||||
(capture)
|
||||
(string) @string.regexp)
|
||||
(#eq? @function "#match?"))
|
||||
|
||||
; highlight inheritance comments
|
||||
((query . (comment) @keyword.directive)
|
||||
(#match? @keyword.directive "^;\ +inherits *:"))
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"["
|
||||
"]"
|
||||
] @punctuation.bracket
|
||||
|
||||
":" @punctuation.delimiter
|
||||
|
||||
[
|
||||
(one_or_more)
|
||||
(zero_or_one)
|
||||
(zero_or_more)
|
||||
] @operator
|
||||
|
||||
[
|
||||
(wildcard_node)
|
||||
(anchor)
|
||||
] @constant.builtin
|
||||
|
||||
[
|
||||
(anonymous_leaf)
|
||||
(string)
|
||||
] @string
|
||||
|
||||
(comment) @comment
|
||||
|
||||
(field_name) @property
|
||||
|
||||
(capture) @label
|
||||
|
||||
(predicate_name) @function
|
||||
|
||||
(escape_sequence) @escape
|
||||
|
||||
(node_name) @variable
|
Loading…
Reference in New Issue