ragurney / spotless-intellij-gradle

An IntelliJ plugin to allow running the Spotless gradle task from within the IDE.
MIT License
38 stars 14 forks source link

Add ActionOnSave #33

Open oraum opened 2 years ago

oraum commented 2 years ago

Heavily inspired by Jetbrains prettierJS plugin

resolves #8

ragurney commented 2 years ago

I think this is blocked until either diffplug/spotless#791 is implemented and merged or we change this PR to only support format on save for the current file only due to the lack of gradle support to run multiple builds in parallel.

pr11me commented 7 months ago

Hey guys, thanks for the work so far :) What is the status of this PR, looks "abandoned"? I think, the ability to format on save the current file only is already quite useful because this is the main use case for this Action on Save anyway. For formatting several files/the whole project one can rely on Gradle (making spotlessApply part of the build chain and/or using a pre-commit hook). The main benefit of the Action on Save for me is being able to write stuff without paying attention to format and then it's tidied up during a thinking pause, thus keeping the code I am working on readable :) What is missing in the PR besides the conflicts? Maybe I could finish it.

ErtugrulSener commented 5 months ago

I think this is blocked until either diffplug/spotless#791 is implemented and merged or we change this PR to only support format on save for the current file only due to the lack of gradle support to run multiple builds in parallel.

Hey. Could we just re-label this PR and run spotless for the currently opened file? This would already solve a lot.

fokkoru commented 1 month ago

Any updates on this?