Open jdneo opened 11 months ago
The only way I found is to use an Eclipse style / format configuration file, like this one : https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml
Or download Eclipse, make your configuration and export it.
Would be great to have an option like this:
The recent update of VSCode brought great things to the Java language support, but unfortunately, there is still no way to deal with formatting. It looks like it's not an important feature for Java.
The most bothering thing is that I didn't find the list of possible properties, neither the available values for those properties.
The recent update of VSCode brought great things to the Java language support, but unfortunately, there is still no way to deal with formatting. It looks like it's not an important feature for Java.
The most bothering thing is that I didn't find the list of possible properties, neither the available values for those properties.
The closest thing I found for formatting Java files is this - https://marketplace.visualstudio.com/items?itemName=JoseVSeb.google-java-format-for-vs-code
If you are using a different set of rules, then you are probably out of luck.
And yes, there is indeed a lack of proper configuration provisions.
Exactly... almost everything I found is "use Google Java format without any flexibility or leave it". The only one I found that allows to modify / set your own rules is the one I mentioned before.
Actually, there is also a plugin using JS prettier with rules for Java, but you need NodeJS installed, but if I do only Java, I don't want NodeJS around.
Discussed in https://github.com/jdneo/vscode-checkstyle/discussions/357