indents(lua): make ")" `@indent_end

Fixes #2476
This commit is contained in:
Stephan Seitz 2022-02-06 19:31:24 +01:00
parent 726d9be3aa
commit 5fd68ba0c2
3 changed files with 10 additions and 0 deletions

View file

@ -15,6 +15,8 @@
[
"end"
")"
"}"
] @indent_end
(return_statement

View file

@ -0,0 +1,6 @@
-- Issue #2476
require("treesitter").setup(
)
local table = {
}

View file

@ -36,5 +36,7 @@ describe("indent Lua:", function()
run:new_line("cond.lua", { on_line = 8, text = "x = x + 1", indent = 4 })
run:new_line("cond.lua", { on_line = 10, text = "x = x + 1", indent = 2 })
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 })
end)
end)