mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-10 23:40:04 -04:00
feat(php): improve indents in return statements & chained methods
This commit is contained in:
parent
df3e6a24ac
commit
143ca5ce17
3 changed files with 126 additions and 0 deletions
|
|
@ -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
|
||||
.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue