Parameter lists with nested functions are not easy to format. The statement you are presenting can format in a flat way (which you desire) whenever the right hand margin is 53 or higher. That means that inside your code unit, if it folds the way you show, the statement must have been indented quite a bit assuming you use a normal right margin (say 80). Perhaps increasing your right hand margin would help. After all, the right margin is a hint which is useful whenever the code is displayed in fixed window of a given size with no horizontal scroll. In this case formatter tries to make all of the code viewable. In an IDE I’d rather set the margin high, and use the list arrangement options to stack wide lists.
I’m open to any suggestion which could help improve such formatting.