mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 02:40:09 -04:00
highlights(c): highlight , operator as operator (#3107)
This commit is contained in:
parent
42ab34c8f7
commit
8f13ef1563
1 changed files with 10 additions and 7 deletions
|
|
@ -46,6 +46,12 @@
|
||||||
|
|
||||||
"#include" @include
|
"#include" @include
|
||||||
|
|
||||||
|
[ ";" ":" "," ] @punctuation.delimiter
|
||||||
|
|
||||||
|
"..." @punctuation.special
|
||||||
|
|
||||||
|
[ "(" ")" "[" "]" "{" "}"] @punctuation.bracket
|
||||||
|
|
||||||
[
|
[
|
||||||
"="
|
"="
|
||||||
|
|
||||||
|
|
@ -90,20 +96,17 @@
|
||||||
"++"
|
"++"
|
||||||
] @operator
|
] @operator
|
||||||
|
|
||||||
|
;; Make sure the comma operator is given a highlight group after the comma
|
||||||
|
;; punctuator so the operator is highlighted properly.
|
||||||
|
(comma_expression [ "," ] @operator)
|
||||||
|
|
||||||
[
|
[
|
||||||
(true)
|
(true)
|
||||||
(false)
|
(false)
|
||||||
] @boolean
|
] @boolean
|
||||||
|
|
||||||
[ ";" ":" "," ] @punctuation.delimiter
|
|
||||||
|
|
||||||
"..." @punctuation.special
|
|
||||||
|
|
||||||
(conditional_expression [ "?" ":" ] @conditional)
|
(conditional_expression [ "?" ":" ] @conditional)
|
||||||
|
|
||||||
|
|
||||||
[ "(" ")" "[" "]" "{" "}"] @punctuation.bracket
|
|
||||||
|
|
||||||
(string_literal) @string
|
(string_literal) @string
|
||||||
(system_lib_string) @string
|
(system_lib_string) @string
|
||||||
(escape_sequence) @string.escape
|
(escape_sequence) @string.escape
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue