I made a small change to an old java file in IntelliJ and when I save the file the IDE automatically reformats all the code. Normally this would be preferable, however it seems
You can add these comments to make it temporarily disable formatting on the file, or a specific function:
// @formatter:off
If you want one section to remain, you can also add this:
// @formatter:on
If @formatter:off is not working, you can enable it in preferences:
@formatter:off