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
For newer versions (at least WebStorm 2018), Ctrl + S is bound to a save Macro that has a reformat code action followed by save.
Ctrl + S
You can remove this reformat with Ctrl + Shift + A search for Macro then modify the save one.
Ctrl + Shift + A
Macro
save
Edit | Macros | Edit Macros | save | - on the Action: Reformat...