Auto-format/import cleanup is way to aggressive in 2024.1

Answered

I have recently upgraded to 2024.1, but I can't seem to turn off auto-formatting or auto-cleanup or whatever is going on every couple seconds, and it removes imports before I've even had a chance to see auto-completion hints.  For example, I want to do “new MyClass(a: Something, b: SomethingElse)”, but I don't know what a and b are.  IntelliJ offers to add the reference to MyClass, but before I can even see what params I need to provide, it removes the import because, due to things not compiling yet, it sees MyClass as unused.

I am using Scala and Bazel (though I don't think this is a bazel issue)

I have “Reformat on compile” unchecked.

0
2 comments

Hi Sydney,

Things to check:

  1. Current settings in File | Settings | Tools | Actions on Save coupled with autosave settings in File | Settings | Appearance & Behavior | System Settings
  2. Temporarily disable all of the downloaded plugins and restart the IDE: File | Settings| Plugins | ⚙ | Disable all downloaded plugins
0

Right, so, autosave enabled + any reformat on save options is a recipe for disaster.  Thank you.

0

Please sign in to leave a comment.