mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
fix(dart): add @indent_end to } (#4167)
* fix dart indentation after } * add some simple test case
This commit is contained in:
parent
5c511dd124
commit
68ab44277c
3 changed files with 28 additions and 0 deletions
4
tests/indent/dart/class.dart
Normal file
4
tests/indent/dart/class.dart
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
void main() {
|
||||
}
|
||||
class Test {
|
||||
}
|
||||
20
tests/indent/dart_spec.lua
Normal file
20
tests/indent/dart_spec.lua
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
local Runner = require("tests.indent.common").Runner
|
||||
|
||||
local run = Runner:new(it, "tests/indent/dart", {
|
||||
tabstop = 4,
|
||||
shiftwidth = 2,
|
||||
softtabstop = 0,
|
||||
expandtab = true,
|
||||
})
|
||||
|
||||
describe("indent Lua:", function()
|
||||
describe("whole file:", function()
|
||||
run:whole_file(".", {
|
||||
expected_failures = {},
|
||||
})
|
||||
end)
|
||||
end)
|
||||
|
||||
describe("new line:", function()
|
||||
run:new_line("class.dart", { on_line = 2, text = "var x;", indent = 0 })
|
||||
end)
|
||||
Loading…
Add table
Add a link
Reference in a new issue