mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
fix(indent/lua): wrong for nested tables due to branch on opening pairs
This commit is contained in:
parent
ab372a88ef
commit
717fef738b
3 changed files with 8 additions and 3 deletions
|
|
@ -24,13 +24,10 @@
|
|||
(function_call))) @dedent
|
||||
|
||||
[
|
||||
"do"
|
||||
"end"
|
||||
"then"
|
||||
"until"
|
||||
"{"
|
||||
"}"
|
||||
"("
|
||||
")"
|
||||
"elseif"
|
||||
(elseif_statement)
|
||||
|
|
|
|||
7
tests/indent/lua/nested-table.lua
Normal file
7
tests/indent/lua/nested-table.lua
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
local a = {
|
||||
{
|
||||
{
|
||||
1
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -38,5 +38,6 @@ describe("indent Lua:", function()
|
|||
run:new_line("cond.lua", { on_line = 12, text = "x = x + 1", indent = 0 })
|
||||
run:new_line("no-indent-after-paren-pairs.lua", { on_line = 3, text = "x = x + 1", indent = 0 })
|
||||
run:new_line("no-indent-after-paren-pairs.lua", { on_line = 6, text = "x = x + 1", indent = 0 })
|
||||
run:new_line("nested-table.lua", { on_line = 5, text = "{}", indent = 4 })
|
||||
end)
|
||||
end)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue