Kim
03/10/2025, 2:55 AMKeith Abdulla
03/12/2025, 9:55 PMmichaelsims
03/12/2025, 10:13 PMmichaelsims
03/12/2025, 10:15 PMKim
03/13/2025, 7:32 AM• Configurable max-width – When we first explored ktfmt, its CLI didn’t support configuring max-width. Different projects and repositories have varying formatting standards, and we wanted to support this flexibility. In our case, we use a standard formatting width of 120 characters.
• Automated Formatting Support in Git Workflow – We wanted formatting to be automatically applied before code is committed to prevent formatting drift as early as possible, keeping it closest to the inner development loop.
• Format-on-save for IntelliJ – Format-on-save for IntelliJ – While ktfmt provides IntelliJ integration, our plugin includes format-on-save support in addition to manual formatting, reducing manual steps for developers.
• Consistent formatting experience across tools – We ensure consistency by having CLI, Gradle, and IntelliJ all use the same CLI under the hood, applying the same formatting rules across all workflows.Seems the comparative advantage of this tool should mostly be point #4 then. For me I already apply ktfmt through pre-commit framework hook and gradle preBuild task via spotless plugin. I also frequently iterate build on Compose preview, etc so format-on-save is not a game changer for me. A quick start section or a demo project to demonstrate the last point might be useful for increased adoption and community feedback (if such is the goal)
Sutina Wipawiwat
03/24/2025, 1:39 AM