mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-15 01:40:02 -04:00
first draft of YAML highlighting
This commit is contained in:
parent
98fba24acf
commit
4addec1361
1 changed files with 31 additions and 0 deletions
31
queries/yaml/highlights.scm
Normal file
31
queries/yaml/highlights.scm
Normal 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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue