Is there any way of getting Android Studio to automatically format code in exactly the way ktlint does it? maybe a configuration XML file that we can import?
There's an unofficial ktlint IDE plugin in the plugin marketplace.
Overall I've moved to ktfmt from facebook over ktlint. ktfmt repo includes an IJ plugin that takes over the default reformat key combo. and it focusses on a deteministic output. I love it 100x more than ktlint.
Join #ktfmt if you're curious.
e
ephemient
06/24/2021, 12:26 AM
for what it's worth, Detekt uses ktlint for formatting rules (as well as adding many more rules) and has functional Gradle and IDE plugins. there's a compiler plugin too, which can help speed up your overall build by doing compile+lint in a single pass.