diff options
| author | Caleb White <cdwhite3@pm.me> | 2024-03-16 19:50:13 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-16 20:50:13 -0400 |
| commit | 143ca5ce17ae21233101246b5785b90d53aa8329 (patch) | |
| tree | 3508a12c877818427060c9ae219bd1195454e465 /queries/php_only/indents.scm | |
| parent | feat(hyprlang): add bash injections (diff) | |
| download | nvim-treesitter-143ca5ce17ae21233101246b5785b90d53aa8329.tar nvim-treesitter-143ca5ce17ae21233101246b5785b90d53aa8329.tar.gz nvim-treesitter-143ca5ce17ae21233101246b5785b90d53aa8329.tar.bz2 nvim-treesitter-143ca5ce17ae21233101246b5785b90d53aa8329.tar.lz nvim-treesitter-143ca5ce17ae21233101246b5785b90d53aa8329.tar.xz nvim-treesitter-143ca5ce17ae21233101246b5785b90d53aa8329.tar.zst nvim-treesitter-143ca5ce17ae21233101246b5785b90d53aa8329.zip | |
feat(php): improve indents in return statements & chained methods
Diffstat (limited to 'queries/php_only/indents.scm')
| -rw-r--r-- | queries/php_only/indents.scm | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/queries/php_only/indents.scm b/queries/php_only/indents.scm index a81faed62..9ee04e770 100644 --- a/queries/php_only/indents.scm +++ b/queries/php_only/indents.scm @@ -1,7 +1,9 @@ [ (array_creation_expression) + (parenthesized_expression) (compound_statement) (declaration_list) + (member_call_expression) (binary_expression) (return_statement) (arguments) @@ -12,6 +14,17 @@ (case_statement) ] @indent.begin +(return_statement + [ + (object_creation_expression) + (anonymous_function_creation_expression) + (arrow_function) + (match_expression) + ]) @indent.dedent + +(member_call_expression + object: (member_call_expression) @indent.branch) + [ ")" "}" @@ -20,9 +33,18 @@ (comment) @indent.auto +(arguments + ")" @indent.end) + +(formal_parameters + ")" @indent.end) + (compound_statement "}" @indent.end) +(return_statement + ";" @indent.end) + (ERROR "(" @indent.align . |
