neovim/runtime/indent/testdir/lua.in
Christian Clason 28e2e8aa04 vim-patch:c0f7505: runtime(lua): add/subtract a 'shiftwidth' after '('/')' in indentexpr
Problem:

- Current lua indentexpr does not indent for '(' ')'.
- Missing indent test for lua.

Solution:

- Match '(', ')' in `function GetLuaIndentIntern`.
- Add an indent test for lua.

closes: vim/vim#15364

c0f7505ede

Co-authored-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
2024-08-04 19:00:10 +02:00

20 lines
280 B
Lua

-- vim: set ft=lua sw=2 noet:
-- START_INDENT
function foo(a, b, c, d)
return { a, b, c, d }
end
local a = foo(
1,
2,
"longxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
4
)
local b = {
1,
2,
}
-- END_INDENT