mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat: improve indent module
get_node_at_line should return appropriate child if available
This commit is contained in:
parent
f048886f82
commit
baf94219aa
5 changed files with 38 additions and 11 deletions
|
|
@ -28,7 +28,7 @@ describe("indent Lua:", function()
|
|||
run:new_line("table.lua", { on_line = 1, text = "b = 0,", indent = 2 })
|
||||
run:new_line("table.lua", { on_line = 5, text = "4,", indent = 4 })
|
||||
run:new_line("table.lua", { on_line = 7, text = "4,", indent = 4 })
|
||||
run:new_line("loop.lua", { on_line = 4, text = "x = x + 1", indent = 2 }, "expected failure", XFAIL)
|
||||
run:new_line("loop.lua", { on_line = 4, text = "x = x + 1", indent = 2 })
|
||||
run:new_line("cond.lua", { on_line = 5, text = "x = x + 1", indent = 2 })
|
||||
run:new_line("cond.lua", { on_line = 7, text = "x = x + 1", indent = 2 })
|
||||
run:new_line("cond.lua", { on_line = 8, text = "x = x + 1", indent = 4 })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue