mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-14 17:30:08 -04:00
parent
503c99d766
commit
3fbf280e34
3 changed files with 17 additions and 5 deletions
|
|
@ -4,6 +4,8 @@
|
||||||
(declaration_list)
|
(declaration_list)
|
||||||
(binary_expression)
|
(binary_expression)
|
||||||
(return_statement)
|
(return_statement)
|
||||||
|
(arguments)
|
||||||
|
(formal_parameters)
|
||||||
] @indent
|
] @indent
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
@ -17,8 +19,3 @@
|
||||||
] @ignore
|
] @ignore
|
||||||
|
|
||||||
(compound_statement "}" @indent_end)
|
(compound_statement "}" @indent_end)
|
||||||
([
|
|
||||||
(arguments)
|
|
||||||
(formal_parameters)
|
|
||||||
] @aligned_indent
|
|
||||||
(#set! "delimiter" "()"))
|
|
||||||
|
|
|
||||||
14
tests/indent/php/issue-2497.php
Normal file
14
tests/indent/php/issue-2497.php
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
|
Route::get('/', function () {
|
||||||
|
return view('welcome');
|
||||||
|
});
|
||||||
|
|
||||||
|
Route::get(
|
||||||
|
'/',
|
||||||
|
1,
|
||||||
|
aaaaaaaaaaaaaaaaaaaaaaaaa,
|
||||||
|
2
|
||||||
|
);
|
||||||
|
|
@ -20,5 +20,6 @@ describe("indent PHP:", function()
|
||||||
"example2.php",
|
"example2.php",
|
||||||
{ on_line = 5, text = "indendation with `enter` in insert mode is not correct", indent = 4 }
|
{ on_line = 5, text = "indendation with `enter` in insert mode is not correct", indent = 4 }
|
||||||
)
|
)
|
||||||
|
run:new_line("issue-2497.php", { on_line = 5, text = "$a =", indent = 4 })
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue