nvim-treesitter/queries/meson/highlights.scm
Stephan Seitz d6a2ecb8b7 highlights: create subscoping for ternary operator
After https://github.com/nvim-treesitter/nvim-treesitter/issues/470,
we decided to use `@conditional` for ternary operator instead of
operator despite `@conditional` is documented for keywords only.
A sub-scoping can make it easier for people to highlight this operator
group differently.

Also unify the usage of `@conditional...` across languages.
2022-12-02 21:42:11 +01:00

76 lines
810 B
Scheme

(comment) @comment
(number) @number
(bool) @boolean
(identifier) @variable
[
"("
")"
"{"
"}"
"["
"]"
] @punctuation.bracket
[
":"
","
"."
] @punctuation.delimiter
[
"and"
"not"
"or"
"in"
] @keyword.operator
[
"="
"=="
"!="
"+"
"/"
"/="
"+="
"-="
">"
">="
] @operator
(ternaryoperator
["?" ":"] @conditional.ternary)
[
"if"
"elif"
"else"
"endif"
] @conditional
[
"foreach"
"endforeach"
(keyword_break)
(keyword_continue)
] @repeat
(string) @string
"@" @punctuation.special
(normal_command
command: (identifier) @function)
(pair
key: (identifier) @property)
(escape_sequence) @string.escape
((identifier) @variable.builtin
(#any-of? @variable.builtin
"meson"
"host_machine"
"build_machine"
"target_machine"
))