Actions on Save (IntelliJ IDEA)
Apply code format on saving file.
Settings recommended
IntelliJ IDEA > Settings
(orFile > Settings
)Tools > Actions on Save
- Check these items on.
- Reformat code
- Optimize imports
- Check these items on.
Editor > Code Style > JSON
- Set the item.
- Keep maximum blank lines in code:
1
- Keep maximum blank lines in code:
- Set the item.
Editor > Code Style > properties
- Check these items on.
- Keep blank lines
- Keep blank lines
- Check these items on.
- Click
OK
.