summaryrefslogtreecommitdiff
path: root/vendor/queries/java
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/queries/java')
-rw-r--r--vendor/queries/java/textobjects.scm49
1 files changed, 49 insertions, 0 deletions
diff --git a/vendor/queries/java/textobjects.scm b/vendor/queries/java/textobjects.scm
new file mode 100644
index 00000000..306efb56
--- /dev/null
+++ b/vendor/queries/java/textobjects.scm
@@ -0,0 +1,49 @@
+; Vendored from helix (https://github.com/helix-editor/helix) at 278b24389:
+; runtime/queries/java/textobjects.scm.
+; Licensed under the Mozilla Public License 2.0 (vendor/queries/helix.LICENSE,
+; https://mozilla.org/MPL/2.0/).
+
+(method_declaration
+ body: (_)? @function.inside) @function.around
+
+(constructor_declaration
+ body: (_) @function.inside) @function.around
+
+(interface_declaration
+ body: (_) @class.inside) @class.around
+
+(class_declaration
+ body: (_) @class.inside) @class.around
+
+(record_declaration
+ body: (_) @class.inside) @class.around
+
+(enum_declaration
+ body: (_) @class.inside) @class.around
+
+(formal_parameters
+ ((_) @parameter.inside . ","? @parameter.around) @parameter.around)
+
+(type_parameters
+ ((_) @parameter.inside . ","? @parameter.around) @parameter.around)
+
+(type_arguments
+ ((_) @parameter.inside . ","? @parameter.around) @parameter.around)
+
+(argument_list
+ ((_) @parameter.inside . ","? @parameter.around) @parameter.around)
+
+[
+ (line_comment)
+ (block_comment)
+] @comment.inside
+
+(line_comment)+ @comment.around
+
+(block_comment) @comment.around
+
+(array_initializer
+ (_) @entry.around)
+
+(enum_body
+ (enum_constant) @entry.around)