diff options
| author | Riley Bruins <ribru17@hotmail.com> | 2024-07-05 10:17:41 -0700 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2024-07-16 13:17:36 +0200 |
| commit | 4836c1df6516cc2f895e362f3d00a15a236407b3 (patch) | |
| tree | 815162c9c389f8440f07acb80eca2a15b3459c09 /tests/indent | |
| parent | feat(python): Improved python indentation (#6859) (diff) | |
| download | nvim-treesitter-4836c1df6516cc2f895e362f3d00a15a236407b3.tar nvim-treesitter-4836c1df6516cc2f895e362f3d00a15a236407b3.tar.gz nvim-treesitter-4836c1df6516cc2f895e362f3d00a15a236407b3.tar.bz2 nvim-treesitter-4836c1df6516cc2f895e362f3d00a15a236407b3.tar.lz nvim-treesitter-4836c1df6516cc2f895e362f3d00a15a236407b3.tar.xz nvim-treesitter-4836c1df6516cc2f895e362f3d00a15a236407b3.tar.zst nvim-treesitter-4836c1df6516cc2f895e362f3d00a15a236407b3.zip | |
fix(lua): indent functions before they are closed
Fixes #6786
Diffstat (limited to 'tests/indent')
| -rw-r--r-- | tests/indent/lua/func.lua | 2 | ||||
| -rw-r--r-- | tests/indent/lua_spec.lua | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/tests/indent/lua/func.lua b/tests/indent/lua/func.lua index 1f95ca97a..e2c3c037f 100644 --- a/tests/indent/lua/func.lua +++ b/tests/indent/lua/func.lua @@ -7,3 +7,5 @@ function foo(x) 1, 2) end + +function hi() diff --git a/tests/indent/lua_spec.lua b/tests/indent/lua_spec.lua index 3fd4d58a1..b54ec6512 100644 --- a/tests/indent/lua_spec.lua +++ b/tests/indent/lua_spec.lua @@ -23,6 +23,7 @@ describe("indent Lua:", function() run:new_line("func.lua", { on_line = 4, text = "y = y + 1", indent = 2 }) run:new_line("func.lua", { on_line = 5, text = "3,", indent = 4 }) run:new_line("func.lua", { on_line = 9, text = "x = x + 1", indent = 0 }) + run:new_line("func.lua", { on_line = 11, text = "x = x + 1", indent = 2 }) run:new_line("string.lua", { on_line = 1, text = "x", indent = 0 }) run:new_line("string.lua", { on_line = 2, text = "x", indent = 0 }) run:new_line("string.lua", { on_line = 3, text = "x", indent = 2 }) |
