summaryrefslogtreecommitdiff
path: root/runtime/queries/tsq/highlights.scm
blob: 5ef6bf4c8c1a6dde48f3c841c8304da21ad66b35 (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
47
48
49
50
; mark the string passed #match? as a regex
(((predicate_name) @function
  (capture)
  (string) @string.regexp)
 (#eq? @function "#match?"))

; highlight inheritance comments
(((comment) @keyword.directive)
 (#match? @keyword.directive "^; +inherits *:"))

[
  "("
  ")"
  "["
  "]"
] @punctuation.bracket

":" @punctuation.delimiter
"!" @operator

[
  (one_or_more)
  (zero_or_one)
  (zero_or_more)
] @operator

[
  (wildcard_node)
  (anchor)
] @constant.builtin

[
  (anonymous_leaf)
  (string)
] @string

(comment) @comment

(field_name) @variable.other.member

(capture) @label

((predicate_name) @function
 (#any-of? @function "#eq?" "#match?" "#any-of?" "#not-any-of?" "#is?" "#is-not?" "#not-same-line?" "#not-kind-eq?" "#set!" "#select-adjacent!" "#strip!"))
(predicate_name) @error

(escape_sequence) @constant.character.escape

(node_name) @tag
(variable) @variable