nbadal / ktlint-intellij-plugin

Ktlint plugin for IntelliJ IDEA + Android Studio
MIT License
158 stars 23 forks source link

Reformatting just a selection #385

Closed Vampire closed 5 months ago

Vampire commented 9 months ago

With 0.20.0-beta-4 when selecting some code block and just invoking a reformat for that block, it would be nice if really just that code block would be reformatted and not the whole file.

I guess ktlint just processes whole files, but maybe the plugin can remember the unselected parts and preserve them or something similar?

paul-dingemans commented 9 months ago

This behavior has never been supported by the plugin. I will consider this at a later time.

paul-dingemans commented 5 months ago

Reference to #504 is invalid for this issue.

Vampire commented 5 months ago

So I got you right that this issue is not yet resolved and should be reopened?

paul-dingemans commented 5 months ago

It will be resolved in next release. Unfortunately, I referenced this issue in another PR as well.