on master help sign in
Add textobjects queries for php (#1601)
e2833b5Daniel S Poulin
book/src/generated/lang-support.md+1−1
@@ -40,7 +40,7 @@
40| ocaml | ✓ | | ✓ | |
40| ocaml | ✓ | | ✓ | |
41| ocaml-interface | ✓ | | | |
41| ocaml-interface | ✓ | | | |
42| perl | ✓ | ✓ | ✓ | |
42| perl | ✓ | ✓ | ✓ | |
43−| php | ✓ | | ✓ | |
43+| php | ✓ | ✓ | ✓ | |
44| prolog | | | | `swipl` |
44| prolog | | | | `swipl` |
45| protobuf | ✓ | | ✓ | |
45| protobuf | ✓ | | ✓ | |
46| python | ✓ | ✓ | ✓ | `pylsp` |
46| python | ✓ | ✓ | ✓ | `pylsp` |
runtime/queries/php/textobjects.scmnew file+30
@@ -0,0 +1,30 @@
1+(class_declaration
2+ body: (_) @class.inside) @class.around
3+
4+(interface_declaration
5+ body: (_) @class.inside) @class.around
6+
7+(trait_declaration
8+ body: (_) @class.inside) @class.around
9+
10+(enum_declaration
11+ body: (_) @class.inside) @class.around
12+
13+(function_definition
14+ body: (_) @function.inside) @function.around
15+
16+(method_declaration
17+ body: (_) @function.inside) @function.around
18+
19+(arrow_function
20+ body: (_) @function.inside) @function.around
21+
22+(anonymous_function_creation_expression
23+ body: (_) @function.inside) @function.around
24+
25+(formal_parameters
26+ [
27+ (simple_parameter)
28+ (variadic_parameter)
29+ (property_promotion_parameter)
30+ ] @parameter.inside)