facebook / ktfmt

A program that reformats Kotlin source code to comply with the common community standard for Kotlin code conventions.
https://facebook.github.io/ktfmt/
Apache License 2.0
896 stars 73 forks source link

[ktfmt_idea_plugin] Add support for format-on-save #60

Closed Javi closed 3 months ago

Javi commented 4 years ago

On Jetbrains IDEs it's a very useful feature

EmmanuelDav commented 10 months ago

@hick209 can I work on this ?

greyhairredbear commented 9 months ago

Isn't that supported by IntelliJ (Settings->Tools->Actions on Save) itself? I have the ktfmt plugin 1.1.0.46 and IntelliJ ultimate 2023.2.5 and checked "reformat code" for kotlin files - this does the trick for me...

hick209 commented 5 months ago

@EmmanuelDav, maybe check what @greyhairredbear mentioned here first. In case you still believe a solution inside of the IDEA plugin would be more elegant feel free to submit a PR

hick209 commented 3 months ago

Closing due to lack of response. Feel free to reopen if that's still an issue for you