Closed azerafati closed 2 months ago
It's probably a bit subjective about which looks better, but for our own use in Spring I think I prefer the existing formatted version. I'm afraid adding a config option goes against the goals of this project:
Since the aim of this project is to provide consistency, each plugin is not generally configurable. You need to change your code to match the required conventions. You can’t configure the plugin conventions to match your style!
We did make tabs/spaces configurable but I'm not keen to do more than that.
If you want to maintain your own fork, you can probably do what you want by editing https://github.com/spring-io/spring-javaformat/blob/main/spring-javaformat/spring-javaformat-formatter/src/main/resources/io/spring/javaformat/formatter/eclipse/formatter.prefs.
Looking at how a record gets formatted for me with version
0.0.42
it makes me think it was more readable to have the arguments in new line. Can this be configured in .springjavaformatconfig or any recommendation?Before
After formatting