aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/tsq/highlights.scm
blob: 9ba5699a86991ecbcc4b9f9f1b39ea29f97ded38 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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