mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
fix(php): fix indentation for in between braces
This commit is contained in:
parent
28e1361d4a
commit
bf87a16712
3 changed files with 4 additions and 3 deletions
|
|
@ -10,7 +10,6 @@
|
|||
(switch_block)
|
||||
(match_block)
|
||||
(case_statement)
|
||||
"["
|
||||
] @indent.begin
|
||||
|
||||
[
|
||||
|
|
@ -25,4 +24,5 @@
|
|||
|
||||
(compound_statement "}" @indent.end)
|
||||
|
||||
(ERROR) @indent.auto
|
||||
(ERROR "(" @indent.align (#set! indent.open_delimiter "(") (#set! indent.close_delimiter ")") . (_))
|
||||
(ERROR "[" @indent.align (#set! indent.open_delimiter "[") (#set! indent.close_delimiter "]") . (_))
|
||||
|
|
|
|||
|
|
@ -2,4 +2,5 @@
|
|||
|
||||
function test() {
|
||||
$array = [
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ describe("indent PHP:", function()
|
|||
{ on_line = 5, text = "indentation with `enter` in insert mode is not correct", indent = 4 }
|
||||
)
|
||||
run:new_line("issue-2497.php", { on_line = 5, text = "$a =", indent = 4 })
|
||||
run:new_line("unfinished-call.php", { on_line = 6, text = "$a =", indent = 0 })
|
||||
run:new_line("unfinished-call.php", { on_line = 6, text = "$a =", indent = 4 })
|
||||
run:new_line("issue-3591.php", { on_line = 4, text = "$a =", indent = 8 })
|
||||
run:new_line("enum-indent.php", { on_line = 4, text = "case", indent = 4 })
|
||||
end)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue