If the new shorthand lambda syntax is used with a lower-case method invocation, a space is added and the code breaks because the lambda expression is no longer atomic.
Workarounds:
Rename to CamelCase (not possible if you don't control the code)
Don't use shorthand lambda in these cases
This is likely related to how Fantomas handles uppercase vs. lowercase invocations. I hope a special case can be added to never insert a space in shorthand lambda expressions.
Extra information
[x] The formatted result breaks my code.
[ ] The formatted result gives compiler warnings.
[ ] I or my company would be willing to help fix this.
[ ] I would like a release if this problem is solved.
Options
Fantomas main branch at 1/1/1990
Default Fantomas configuration
Did you know that you can ignore files when formatting by using a .fantomasignore file?PS: It's unlikely that someone else will solve your specific issue, as it's something that you have a personal stake in.
Issue created from fantomas-online
Code
Result
Problem description
If the new shorthand lambda syntax is used with a lower-case method invocation, a space is added and the code breaks because the lambda expression is no longer atomic.
Workarounds:
This is likely related to how Fantomas handles uppercase vs. lowercase invocations. I hope a special case can be added to never insert a space in shorthand lambda expressions.
Extra information
Options
Fantomas main branch at 1/1/1990
Default Fantomas configuration
Did you know that you can ignore files when formatting by using a .fantomasignore file? PS: It's unlikely that someone else will solve your specific issue, as it's something that you have a personal stake in.