aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/java/highlights.scm
diff options
context:
space:
mode:
authorGammut2023-05-26 21:37:19 +0000
committerGitHub2023-05-26 21:37:19 +0000
commit86ef389c0dfc445ba2888a81edcc13113d1638bc (patch)
treef2468c8f9db2060337ce2441f0490d4094ed4c68 /runtime/queries/java/highlights.scm
parent61a89956e3baff9d6a3446871d0234f65992827d (diff)
Highlight query improvements for java and typescript (#7145)
* Add missing queries to java highlights * Fix generic type bracket highlights in typescript
Diffstat (limited to 'runtime/queries/java/highlights.scm')
-rw-r--r--runtime/queries/java/highlights.scm83
1 files changed, 81 insertions, 2 deletions
diff --git a/runtime/queries/java/highlights.scm b/runtime/queries/java/highlights.scm
index f049b8d2..ae99a33a 100644
--- a/runtime/queries/java/highlights.scm
+++ b/runtime/queries/java/highlights.scm
@@ -13,8 +13,6 @@
(marker_annotation
name: (identifier) @attribute)
-"@" @operator
-
; Types
(interface_declaration
@@ -48,6 +46,9 @@
(void_type)
] @type.builtin
+(type_arguments
+ (wildcard "?" @type.builtin))
+
; Variables
((identifier) @constant
@@ -87,6 +88,84 @@
(line_comment) @comment
(block_comment) @comment
+; Punctuation
+
+[
+ "::"
+ "."
+ ";"
+ ","
+] @punctuation.delimiter
+
+[
+ "@"
+ "..."
+] @punctuation.special
+
+[
+ "("
+ ")"
+ "["
+ "]"
+ "{"
+ "}"
+] @punctuation.bracket
+
+(type_arguments
+ [
+ "<"
+ ">"
+ ] @punctuation.bracket)
+
+(type_parameters
+ [
+ "<"
+ ">"
+ ] @punctuation.bracket)
+
+; Operators
+
+[
+ "="
+ ">"
+ "<"
+ "!"
+ "~"
+ "?"
+ ":"
+ "->"
+ "=="
+ ">="
+ "<="
+ "!="
+ "&&"
+ "||"
+ "++"
+ "--"
+ "+"
+ "-"
+ "*"
+ "/"
+ "&"
+ "|"
+ "^"
+ "%"
+ "<<"
+ ">>"
+ ">>>"
+ "+="
+ "-="
+ "*="
+ "/="
+ "&="
+ "|="
+ "^="
+ "%="
+ "<<="
+ ">>="
+ ">>>="
+] @operator
+
; Keywords
[