From a8215f107c43103234edd39649356a12ca5e65cd Mon Sep 17 00:00:00 2001 From: Andrew Dupont Date: Sat, 27 Jan 2024 18:13:42 -0800 Subject: [PATCH] =?UTF-8?q?[language-java]=20Add=20highlights=20for=20vari?= =?UTF-8?q?ables=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …when assigning, reassigning, or incrementing. Also add `++` and `--` as operators. --- .../grammars/tree-sitter-java/highlights.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/language-java/grammars/tree-sitter-java/highlights.scm b/packages/language-java/grammars/tree-sitter-java/highlights.scm index d7644e1c34..86a06a56a2 100644 --- a/packages/language-java/grammars/tree-sitter-java/highlights.scm +++ b/packages/language-java/grammars/tree-sitter-java/highlights.scm @@ -217,9 +217,13 @@ (identifier) @variable.parameter.lambda.java)) (variable_declarator - name: (identifier) @variable.other.assignment.java) + name: (identifier) @variable.other.declaration.java) +(assignment_expression + left: (identifier) @variable.other.assignment.java) +(update_expression + (identifier) @variable.other.assignment.java) ; PACKAGES ; ======== @@ -359,6 +363,8 @@ (binary_expression ["&" "|" "^" "~" "<<" ">>" ">>>"] @keyword.operator.bitwise.java) +["++" "--"] @keyword.operator.increment.java + "." @keyword.operator.accessor.dot.java "::" @keyword.operator.accessor.method-reference.java