Edgar Avuzi
10/10/2026, 5:39 PMkotlin to have a format command to format Kotlin source code. Non-configurable format command to avoid bikeshedding.
Similar to gleam format which existsEdgar Avuzi
10/10/2026, 5:42 PMjoffrey
10/10/2026, 7:01 PMkotlin format commandJames
10/11/2026, 2:27 PMEmiel Bon
10/21/2026, 10:16 AMktfmt still produced obviously less readable/elegant formatting than doing it by hand. An illustrative (not real) example:
// By hand
val handlers = mapOf(
"create" to CreateHandler(repository, validator),
"delete" to DeleteHandler(repository),
)
vs.
// kfmt
val handlers =
mapOf(
"create" to
CreateHandler(repository, validator),
"delete" to DeleteHandler(repository),
)
It can be quite frustrating when you've designed an easy to read API / DSL and have the formatter ruin the structure.
Bikeshedding is of course very frustrating. Though if this formatter doesn't produce excellent results, I can also see that becoming a frustrating discussion between team members that get joy from creating readable code, and team members that get joy from delivering the next feature quickly. Ideally this formatter satisfies both.joffrey
10/21/2026, 11:30 AMvsevolod.tolstopyatov
10/21/2026, 11:33 AMEmiel Bon
10/21/2026, 11:34 AM