Open tmccombs opened 7 years ago
this also happens for function definitions, i.e. should do:
def foo(
i: Int,
j: Int,
): Int = {
// body
}
but actually does:
def foo(
i: Int,
j: Int,
): Int = {
// body
}
In fact, the exact same problem also exists for function calls, not only function definitions. I.e., it does this:
foo(
1,
2,
) // should not be indented
I went ahead and looked at indent/scala.vim to propose a fix, but vimscript man... helluva language
If the iteration part of a for loop is multiple lines, for example:
then when I type the second opening brace (after yield) it iwll indent the line so the first closing brace lines up with the line before, like:
The same thing happens if the yield isn't there. Strangely , if I don't have the second opening brace the line with the closing brace indents correctly.