first draft of YAML highlighting

This commit is contained in:
David Hotham 2020-12-16 09:59:59 +00:00 committed by Thomas Vigouroux
parent 98fba24acf
commit 4addec1361

View file

@ -0,0 +1,31 @@
(block_mapping_pair key: (flow_node) @field)
(flow_pair key: (flow_node) @field) ; This one doesn't seem to work, no idea what's wrong with it.
(boolean_scalar) @boolean
(null_scalar) @constant.builtin
(double_quote_scalar) @string
(single_quote_scalar) @string
(double_quote_scalar (escape_sequence)) @string.escape
(single_quote_scalar (escape_sequence)) @string.escape
(integer_scalar) @number
(float_scalar) @number
(comment) @comment
(anchor) @type
(alias) @type
(tag) @type
(yaml_directive) @keyword
(ERROR) @error
[
; "+" ; including this causes "invalid node type" errors?!?
","
"-"
":"
">"
"?"
"|"
] @punctuation.delimiter
[
"["
"]"
"{"
"}"
] @punctuation.bracket