idea 2023.3无法使用save actions
推荐替代方案列表
- ✅ 内建的 Actions on Save(无插件)
IDEA 从 2022.1 起就内建了“保存时操作”,其实足以替代大部分 Save Actions 的功能。
路径:
Settings > Tools > Actions on Save
功能勾选推荐:
✅ Reformat code
✅ Optimize imports
✅ Rearrange code
✅ Run code cleanup (可选)
适用语言:Java、Kotlin、XML、HTML、JSON 等
✅ 无需插件、兼容性好、官方维护
2.editorconfig Support(自带支持,无需插件)
.editorconfig 是一种跨 IDE 的代码风格控制方式。
示例配置:
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
IDEA 会自动识别并应用这些规则,保持团队统一代码风格。