This is a follow-up to issue #287:
@NathanLovato
New findings, probably related to this again:
Input:
func _test() -> void:
var test: String = ", ".join([].map(func(it: String) -> String: return it))
Command:
gdscript-formatter --use-spaces --max-line-length 10 .\test.gd
--max-line-length 10 is only to simulate a long expression, not necessary.
Output
func _test() -> void:
var test: String = ", ".join(
[].map(
func(
it: String
) -> String:
return it
)
)
I've a really big codebase that contains all sort of things including addons. I believe this is the only remaining code that breaks after i use the formatter.
Originally posted by @portlek in #287
This is a limitation of the GDScript parser that we need to work around. It wants whatever comes after a multi-line lambda to be indented at the same level.
Need to decide on what to do with lambdas in parenthesized expressions, if to give them snug parentheses, or trailing coma, or always indent the following closing parentheses.
This is a follow-up to issue #287:
Originally posted by @portlek in #287
This is a limitation of the GDScript parser that we need to work around. It wants whatever comes after a multi-line lambda to be indented at the same level.
Need to decide on what to do with lambdas in parenthesized expressions, if to give them snug parentheses, or trailing coma, or always indent the following closing parentheses.