Yeah, I know, that title is a mouthful. I’m not sure how else to word it; I’ll just show what happens.
I’ve had this problem for quite a while now, but couldn’t figure out what was causing it. If you open up a table and a function in the same line, their auto-indent “stacks”, and turns into a double indent. This is very annoying at times.
In this first example, I’m just opening a function block, so everything indents correctly:
But if I want to wrap the pcall's return in a new table, this happens:
Uh oh. The automatic indenting seems to stack and mess it all up. Very ugly. Could we get this fixed soon?
Sorry for this unexpected absolute indenting. This is a bug we should fix last week. Do you still see this issue when the Auto-indent rule is absolute?
Thanks for reporting this You get 2 indent level at second line because both “{” and “function()” are indentable keyword. We actually suggest user to give new line after table symbol “{” if there is function within it.
local pcallReturn = {
pcall(function()
print("Ack! This is wrong!")
end)
}
But I think we should also help user to split these indentable symbol automatically. It’s planning feature.