Automatically reformat code on save in IntelliJ
Jul 12, 2023
Configure the IDE to reformat code in modified files automatically when your changes are saved.
- Press Ctrl+Alt+S to open the IDE settings
- select Tools | Actions on Save.
- Enable the Reformat code option.
- Click OK