aboutsummaryrefslogtreecommitdiffstats
path: root/queries/java
diff options
context:
space:
mode:
authorStephan Seitz <stephan.seitz@fau.de>2020-09-13 15:08:11 +0200
committerStephan Seitz <stephan.lauf@yahoo.de>2020-09-19 07:30:49 +0200
commit7e3c4f808940a981a034709163724eb5a7546e2d (patch)
tree9ac40da7363fa5a01a24107b7843f36f9fab4a86 /queries/java
parentLink to gallery (diff)
downloadnvim-treesitter-7e3c4f808940a981a034709163724eb5a7546e2d.tar
nvim-treesitter-7e3c4f808940a981a034709163724eb5a7546e2d.tar.gz
nvim-treesitter-7e3c4f808940a981a034709163724eb5a7546e2d.tar.bz2
nvim-treesitter-7e3c4f808940a981a034709163724eb5a7546e2d.tar.lz
nvim-treesitter-7e3c4f808940a981a034709163724eb5a7546e2d.tar.xz
nvim-treesitter-7e3c4f808940a981a034709163724eb5a7546e2d.tar.zst
nvim-treesitter-7e3c4f808940a981a034709163724eb5a7546e2d.zip
Add @keyword.operator for operators that are English words and add @exception for Java/JS
Diffstat (limited to 'queries/java')
-rw-r--r--queries/java/highlights.scm20
1 files changed, 14 insertions, 6 deletions
diff --git a/queries/java/highlights.scm b/queries/java/highlights.scm
index 70cbb28a7..f8ce34c8b 100644
--- a/queries/java/highlights.scm
+++ b/queries/java/highlights.scm
@@ -141,7 +141,6 @@
"abstract"
"assert"
"break"
-"catch"
"class"
"continue"
"default"
@@ -149,13 +148,11 @@
"exports"
"extends"
"final"
-"finally"
"implements"
"instanceof"
"interface"
"module"
"native"
-"new"
"open"
"opens"
"package"
@@ -168,17 +165,18 @@
"static"
"strictfp"
"synchronized"
-"throw"
-"throws"
"to"
"transient"
"transitive"
-"try"
"uses"
"volatile"
"with"
] @keyword
+[
+ "new"
+] @keyword.operator
+
; Conditionals
[
@@ -218,6 +216,16 @@
")"
] @punctuation.bracket
+; Exceptions
+
+[
+"throw"
+"throws"
+"finally"
+"try"
+"catch"
+] @exception
+
; Labels
(labeled_statement
(identifier) @label)