Add textobjects queries for php (#1601)
* Add textobjects queries for php
* Missing EOL fix
* Update generated docs after adding textobjects to php
commite2833b58533f3991fa68061a21486b1322239fe3
authorDaniel S Poulin <dan.poulin@digitalsurgeons.com>
dateSat 29 Jan 2022, 21:04 (5 years ago)
parent333c294
book/src/generated/lang-support.md+1−1
@@ -40,7 +40,7 @@
4040| ocaml | ✓ | | ✓ | |
4141| ocaml-interface | ✓ | | | |
4242| perl | ✓ | ✓ | ✓ | |
43−| php | ✓ | | ✓ | |
43+| php | ✓ | ✓ | ✓ | |
4444| prolog | | | | `swipl` |
4545| protobuf | ✓ | | ✓ | |
4646| 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)