summaryrefslogtreecommitdiff
path: root/vendor/queries/php/textobjects.scm
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/queries/php/textobjects.scm')
-rw-r--r--vendor/queries/php/textobjects.scm63
1 files changed, 63 insertions, 0 deletions
diff --git a/vendor/queries/php/textobjects.scm b/vendor/queries/php/textobjects.scm
new file mode 100644
index 00000000..8bf7fab9
--- /dev/null
+++ b/vendor/queries/php/textobjects.scm
@@ -0,0 +1,63 @@
+; Vendored from helix (https://github.com/helix-editor/helix) at 278b24389:
+; runtime/queries/php/textobjects.scm.
+; Licensed under the Mozilla Public License 2.0 (vendor/queries/helix.LICENSE,
+; https://mozilla.org/MPL/2.0/).
+
+(class_declaration
+ body: (_) @class.inside) @class.around
+
+(interface_declaration
+ body: (_) @class.inside) @class.around
+
+(trait_declaration
+ body: (_) @class.inside) @class.around
+
+(enum_declaration
+ body: (_) @class.inside) @class.around
+
+(function_definition
+ body: (_) @function.inside) @function.around
+
+(method_declaration
+ body: (_) @function.inside) @function.around
+
+(arrow_function
+ body: (_) @function.inside) @function.around
+
+(anonymous_function
+ body: (_) @function.inside) @function.around
+
+(anonymous_class
+ body: (_) @class.inside) @class.around
+
+(property_hook
+ body: (_) @function.inside) @function.around
+
+(anonymous_function_use_clause
+ ((_) @parameter.inside . ","? @parameter.around) @parameter.around)
+
+(formal_parameters
+ ([
+ (simple_parameter)
+ (variadic_parameter)
+ (property_promotion_parameter)
+ ] @parameter.inside . ","? @parameter.around) @parameter.around)
+
+(arguments
+ ((_) @parameter.inside . ","? @parameter.around) @parameter.around)
+
+(comment) @comment.inside
+
+(comment)+ @comment.around
+
+(array_creation_expression
+ (array_element_initializer
+ (_) @entry.inside
+ ) @entry.around @entry.movement)
+
+(list_literal
+ (_) @entry.inside @entry.around @entry.movement)
+
+[
+ (enum_case)
+] @entry.around @entry.movement