mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 11:20:07 -04:00
fix(dart): try statement wouldn't indent (#4623)
This commit is contained in:
parent
fa9fe9a95b
commit
2fe7f969c1
3 changed files with 7 additions and 0 deletions
|
|
@ -10,6 +10,7 @@
|
||||||
(list_literal)
|
(list_literal)
|
||||||
(return_statement)
|
(return_statement)
|
||||||
(arguments)
|
(arguments)
|
||||||
|
(try_statement)
|
||||||
] @indent.begin
|
] @indent.begin
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
|
||||||
5
tests/indent/dart/try.dart
Normal file
5
tests/indent/dart/try.dart
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
void test() {
|
||||||
|
try{
|
||||||
|
} catch(e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -17,4 +17,5 @@ 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 })
|
||||||
end)
|
end)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue