aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJędrzej Boczar <yendreij@gmail.com>2022-04-06 21:14:56 +0200
committerStephan Seitz <stephan.seitz@fau.de>2022-04-06 21:28:11 +0200
commit717fef738bd67b644e70d84182e9b285bf64f810 (patch)
treeeeba9d8c4bfab678494181674f516b6279b9c6dd /tests
parentInject query into lua for set_query calls (diff)
downloadnvim-treesitter-717fef738bd67b644e70d84182e9b285bf64f810.tar
nvim-treesitter-717fef738bd67b644e70d84182e9b285bf64f810.tar.gz
nvim-treesitter-717fef738bd67b644e70d84182e9b285bf64f810.tar.bz2
nvim-treesitter-717fef738bd67b644e70d84182e9b285bf64f810.tar.lz
nvim-treesitter-717fef738bd67b644e70d84182e9b285bf64f810.tar.xz
nvim-treesitter-717fef738bd67b644e70d84182e9b285bf64f810.tar.zst
nvim-treesitter-717fef738bd67b644e70d84182e9b285bf64f810.zip
fix(indent/lua): wrong for nested tables due to branch on opening pairs
Diffstat (limited to 'tests')
-rw-r--r--tests/indent/lua/nested-table.lua7
-rw-r--r--tests/indent/lua_spec.lua1
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/indent/lua/nested-table.lua b/tests/indent/lua/nested-table.lua
new file mode 100644
index 000000000..cf507d1da
--- /dev/null
+++ b/tests/indent/lua/nested-table.lua
@@ -0,0 +1,7 @@
+local a = {
+ {
+ {
+ 1
+ },
+ },
+}
diff --git a/tests/indent/lua_spec.lua b/tests/indent/lua_spec.lua
index 2da965e48..f584e5574 100644
--- a/tests/indent/lua_spec.lua
+++ b/tests/indent/lua_spec.lua
@@ -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)