Is there a way to make Auto-Indent Lines an Action on Save?
已回答
I would like for Kotlin code to be properly formatted and indented whenever a file is saved. Under Tools > Actions on Save, I was able to specify Reformat Code. I would also like for it to run Auto-Indent Lines. I don't see a way to do so. Is it possible?
I am using IntelliJ IDEA 2024.2.4 (Ultimate Edition).
Thank you.
请先登录再写评论。
You could try the Save Actions X plugin here: https://plugins.jetbrains.com/plugin/22113-save-actions-x
It provides an setting in `File | Settings | Other Settings | Save Actions | Build Actions | [experimental] Execute an action` for your use case.