Rafs

    Rafs

    1 year ago
    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?
    a

    Abhishek Dewan

    1 year ago
    And then you can use the SaveActions plugins to format on save (https://plugins.jetbrains.com/plugin/7642-save-actions)
    Colton Idle

    Colton Idle

    1 year ago
    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

    1 year ago
    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.