aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/yuck/highlights.scm
blob: 483348a8c56376a46befe3cda0a2f4db499eec1e (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
(ERROR) @error

(line_comment) @comment

; keywords and symbols

(keyword) @keyword
(symbol) @tag

; literals

(bool_literal) @constant.builtin.boolean
(num_literal) @constant.numeric

; strings
(string_interpolation
  (string_interpolation_start) @punctuation.special
  (string_interpolation_end) @punctuation.special)

(escape_sequence) @constant.character.escape

(string
  [
    (unescaped_single_quote_string_fragment)
    (unescaped_double_quote_string_fragment)
    (unescaped_backtick_string_fragment)
    "\""
    "'"
    "`"
  ]) @string

; operators and general punctuation

(unary_expression
  operator: _ @operator)

(binary_expression
  operator: _ @operator)

(ternary_expression
  operator: _ @operator)

[
  ":"
  "."
  ","
] @punctuation.delimiter

[
  "("
  ")"
  "["
  "]"
  "{"
  "}"
] @punctuation.bracket
[
  ":"
  "."
  ","
] @punctuation.delimiter

; Rest (general identifiers that are not yet catched)

(index) @variable
(ident) @variable