From d6a2ecb8b7093d6f6673cb6748bce9214a5099d3 Mon Sep 17 00:00:00 2001 From: Stephan Seitz Date: Fri, 2 Dec 2022 20:22:58 +0100 Subject: 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. --- CONTRIBUTING.md | 1 + 1 file changed, 1 insertion(+) (limited to 'CONTRIBUTING.md') diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a510f0e7f..9e104f252 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -146,6 +146,7 @@ effect on highlighting. We will work on improving highlighting in the near futur @keyword.return ; keywords like `return` and `yield` @conditional ; keywords related to conditionals (e.g. `if` / `else`) +@conditional.ternary ; Ternary operator: condition ? 1 : 2 @repeat ; keywords related to loops (e.g. `for` / `while`) @debug ; keywords related to debugging @label ; GOTO and other labels (e.g. `label:` in C) -- cgit v1.2.3-70-g09d2