diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2024-08-04 18:59:47 +0200 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2024-08-04 19:00:10 +0200 |
| commit | 28e2e8aa04308fbba1cdd9ec65305af95d9d1a0f (patch) | |
| tree | 4041d6ac62dd901f477323a47dc07135764a191a /runtime/indent/testdir/lua.in | |
| parent | be9eaac7e8ee9961ffe1e5d5d25dfc3b7a83ba57 (diff) | |
| download | rneovim-28e2e8aa04308fbba1cdd9ec65305af95d9d1a0f.tar.gz rneovim-28e2e8aa04308fbba1cdd9ec65305af95d9d1a0f.tar.bz2 rneovim-28e2e8aa04308fbba1cdd9ec65305af95d9d1a0f.zip | |
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
https://github.com/vim/vim/commit/c0f7505edeb36bf3e19386f276cafad7cba717a2
Co-authored-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Diffstat (limited to 'runtime/indent/testdir/lua.in')
| -rw-r--r-- | runtime/indent/testdir/lua.in | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/runtime/indent/testdir/lua.in b/runtime/indent/testdir/lua.in new file mode 100644 index 0000000000..c8f5d2bb8d --- /dev/null +++ b/runtime/indent/testdir/lua.in @@ -0,0 +1,19 @@ +-- 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 |