Lua toggle_multiline mulfunction
Bekaboo opened this issue · comments
Currently toggle_multiline for Lua cannot wrap a table in one line:
simplescreenrecorder-2023-01-09_15.10.09.mp4
So I can kinda reproduce this. The node-action doesn't add a linebreak, but lua-language-server
will do it when it formats the buffer, since the line is now too long. Can you see if the issue still happens after running :LspStop
?
Screen.Recording.2023-01-09.at.22.19.57.mov
Thanks for your reply, after :LspStop
the table can be wrapped into one line, so it is an issue with LSP.
Ahh, ok, I think it's because you are overwriting ==
with { 'n', '==', '<cmd>lua vim.lsp.buf.format()<CR>' },
and I use it here https://github.com/CKolkey/ts-node-action/blob/master/lua/ts-node-action/init.lua#L33 to indent the updated lines. Ill try to see if theres a nicer way to apply indentexpr to a range of lines.
Exactly. I would suggest using normal!
to force using the defult mapling.