ktfmt
ktfmt copied to clipboard
Indentation level should be a command-line argument
Defaulting to 2-spaces is a bit...odd. If you really insist on 2-spaces, provide a separate command-line argument to override this.
Your README says:
--dropbox-style
makesktfmt
use a block indent of 4 spaces instead of 2. See below for details.Note: There is no configurability as to the formatter's algorithm for formatting (apart from
--dropbox-style
). This is a deliberate design decision to unify our code formatting on a single format.
But...both kotlinlang.com and Google recommend 4-space indentation for Kotlin.
What are you suggesting to be done here? Change the default to 4 spaces?
You could specify --kotlinlang-style
to use the Kotlin recommended one. We do not have the intention to change the default.
FWIW Google uses 2 space formatting for their code as well (see the --google-style
), the one you mentioned is the Android recommendation, which is different from how they write their code internally.
Closed due to lack of response