diff options
| author | guijan <guilherme.janczak@yandex.com> | 2022-07-08 07:00:56 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-08 09:00:56 +0200 |
| commit | 8f13ef1563254400da1686f3d3abc62919b2a88d (patch) | |
| tree | 03636f36805eb4eac862ab59af87d97891c919a9 | |
| parent | Update lockfile.json (diff) | |
| download | nvim-treesitter-8f13ef1563254400da1686f3d3abc62919b2a88d.tar nvim-treesitter-8f13ef1563254400da1686f3d3abc62919b2a88d.tar.gz nvim-treesitter-8f13ef1563254400da1686f3d3abc62919b2a88d.tar.bz2 nvim-treesitter-8f13ef1563254400da1686f3d3abc62919b2a88d.tar.lz nvim-treesitter-8f13ef1563254400da1686f3d3abc62919b2a88d.tar.xz nvim-treesitter-8f13ef1563254400da1686f3d3abc62919b2a88d.tar.zst nvim-treesitter-8f13ef1563254400da1686f3d3abc62919b2a88d.zip | |
highlights(c): highlight `,` operator as operator (#3107)
| -rw-r--r-- | queries/c/highlights.scm | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/queries/c/highlights.scm b/queries/c/highlights.scm index bf7ae9e60..0bab9ed8a 100644 --- a/queries/c/highlights.scm +++ b/queries/c/highlights.scm @@ -46,6 +46,12 @@ "#include" @include +[ ";" ":" "," ] @punctuation.delimiter + +"..." @punctuation.special + +[ "(" ")" "[" "]" "{" "}"] @punctuation.bracket + [ "=" @@ -90,20 +96,17 @@ "++" ] @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) (false) ] @boolean -[ ";" ":" "," ] @punctuation.delimiter - -"..." @punctuation.special - (conditional_expression [ "?" ":" ] @conditional) - -[ "(" ")" "[" "]" "{" "}"] @punctuation.bracket - (string_literal) @string (system_lib_string) @string (escape_sequence) @string.escape |
