mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-16 18:30:06 -04:00
Revert "fix(dart): function argument indents is inconsistent"
This reverts commit ac4020c707.
This commit is contained in:
parent
18f9e1a47f
commit
ce3ea7aebe
3 changed files with 1 additions and 17 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
[
|
[
|
||||||
(class_body)
|
(class_body)
|
||||||
(function_body)
|
(function_body)
|
||||||
|
(function_expression_body)
|
||||||
(declaration (initializers))
|
(declaration (initializers))
|
||||||
(switch_block)
|
(switch_block)
|
||||||
(if_statement)
|
(if_statement)
|
||||||
|
|
@ -27,7 +28,5 @@
|
||||||
|
|
||||||
; this one is for dedenting the else block
|
; this one is for dedenting the else block
|
||||||
(if_statement (block) @indent.branch)
|
(if_statement (block) @indent.branch)
|
||||||
; Issue #4637
|
|
||||||
(function_expression_body (block) @indent.branch)
|
|
||||||
|
|
||||||
(comment) @indent.ignore
|
(comment) @indent.ignore
|
||||||
|
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
// Example method that causes an issue with indentation on usage
|
|
||||||
void someMethod(
|
|
||||||
void onSuccess(),
|
|
||||||
void onError(Exception ex, StackTrace stackTrace),
|
|
||||||
) {
|
|
||||||
try {} catch (_, __) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
someMethod(() {
|
|
||||||
}, (Exception ex, StackTrace stackTrace) {
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
@ -18,6 +18,4 @@ end)
|
||||||
describe("new line:", function()
|
describe("new line:", function()
|
||||||
run:new_line("class.dart", { on_line = 2, text = "var x;", indent = 0 })
|
run:new_line("class.dart", { on_line = 2, text = "var x;", indent = 0 })
|
||||||
run:new_line("try.dart", { on_line = 2, text = "var x;", indent = 4 })
|
run:new_line("try.dart", { on_line = 2, text = "var x;", indent = 4 })
|
||||||
run:new_line("multiple_arguments.dart", { on_line = 10, text = "var x;", indent = 4 })
|
|
||||||
run:new_line("multiple_arguments.dart", { on_line = 11, text = "var x;", indent = 4 })
|
|
||||||
end)
|
end)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue