Closed ctdavids closed 3 months ago
Good find! Tnx for reporting the reproduction path which was very helpful in solving the issue. Solved in https://github.com/nbadal/ktlint-intellij-plugin/commit/c202e99b54d288098f3c9df3a574a0a38dd086ad. See latest version on https://plugins.jetbrains.com/plugin/15057-ktlint/versions/dev
With the plugin disabled (at the Intellij disabling plugin level) and default IntelliJ formatting this code is not adjusted when you run IntelliJ autoformatting:
With the plugin enabled (at IntelliJ level), but configured as disabled under the KtLint setting, the code IS reformatted as:
The plugin DOES seem to respect not running on save when in disabled mode.
In order to get the plugin the stop reformatting things while in Disabled mode you have to first change it to Manual mode and uncheck the "attach to IntelliJ IDEA formatting" option (an option which is not visible in Disabled mode).