summaryrefslogtreecommitdiff
path: root/queries/yaml/highlights.scm
blob: 7e3c3a5e6f1820c24bac990ce7926fe7f4a5cfeb (plain)
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
(boolean_scalar) @boolean
(null_scalar) @constant.builtin
(double_quote_scalar) @string
(single_quote_scalar) @string
(block_scalar) @string
(string_scalar) @string
(escape_sequence) @string.escape
(integer_scalar) @number
(float_scalar) @number
(comment) @comment @spell
(anchor_name) @type
(alias_name) @type
(tag) @type
(ERROR) @error

[
  (yaml_directive)
  (tag_directive)
  (reserved_directive)
] @preproc

(block_mapping_pair
  key: (flow_node [(double_quote_scalar) (single_quote_scalar)] @field))
(block_mapping_pair
  key: (flow_node (plain_scalar (string_scalar) @field)))

(flow_mapping
  (_ key: (flow_node [(double_quote_scalar) (single_quote_scalar)] @field)))
(flow_mapping
  (_ key: (flow_node (plain_scalar (string_scalar) @field))))

[
 ","
 "-"
 ":"
 ">"
 "?"
 "|"
] @punctuation.delimiter

[
 "["
 "]"
 "{"
 "}"
] @punctuation.bracket

[
 "*"
 "&"
 "---"
 "..."
] @punctuation.special