diff options
author | Lennard Hofmann | 2022-11-26 16:17:10 +0000 |
---|---|---|
committer | GitHub | 2022-11-26 16:17:10 +0000 |
commit | fc811726e0e74dd6597f1ebbbd095901b8a78a3e (patch) | |
tree | 8b556487ee8afef327226b73385eb783b3c09467 /runtime/queries/java/highlights.scm | |
parent | 8529d756fad2eeea543b487e1ff5253857bc2e16 (diff) |
Update tree-sitter-java and add Java textobjects (#4886)
Diffstat (limited to 'runtime/queries/java/highlights.scm')
-rw-r--r-- | runtime/queries/java/highlights.scm | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/runtime/queries/java/highlights.scm b/runtime/queries/java/highlights.scm index 77902fce..f049b8d2 100644 --- a/runtime/queries/java/highlights.scm +++ b/runtime/queries/java/highlights.scm @@ -21,6 +21,8 @@ name: (identifier) @type) (class_declaration name: (identifier) @type) +(record_declaration + name: (identifier) @type) (enum_declaration name: (identifier) @type) @@ -33,6 +35,8 @@ (constructor_declaration name: (identifier) @type) +(compact_constructor_declaration + name: (identifier) @type) (type_identifier) @type @@ -59,6 +63,7 @@ (hex_integer_literal) (decimal_integer_literal) (octal_integer_literal) + (binary_integer_literal) ] @constant.numeric.integer [ @@ -67,7 +72,11 @@ ] @constant.numeric.float (character_literal) @constant.character -(string_literal) @string + +[ + (string_literal) + (text_block) +] @string [ (true) @@ -75,7 +84,8 @@ (null_literal) ] @constant.builtin -(comment) @comment +(line_comment) @comment +(block_comment) @comment ; Keywords @@ -104,15 +114,19 @@ "module" "native" "new" + "non-sealed" "open" "opens" "package" + "permits" "private" "protected" "provides" "public" "requires" + "record" "return" + "sealed" "static" "strictfp" "switch" @@ -127,4 +141,5 @@ "volatile" "while" "with" + "yield" ] @keyword |