ktfmt
ktfmt copied to clipboard
Consume .editorconfig for configuration
https://editorconfig.org/ is a simple standard that both KTLint and Intellij can consume from. This would be a nice addition to ktfmt to allow for more configuration when needed without custom APIs/params in the tool.
What did you have in mind? Something like that?
[*.kt]
indent_size = 4 # or 2
(ktfmt only supports one flag: --dropbox-style.)
Here's our current one at Uber. Intellij and Ktlint will read from this for indent_size, continuation_indent_size, and max length (I believe)
[*.{kt,kts}]
indent_size=2
continuation_indent_size=4
insert_final_newline=true
max_line_length=120
disabled_rules=package-name
If there is any interest I could work some more on #303 until it is usable.