This feature is related to unused imports highlighting. As of yet, it removes all unused imports, preserving those that remain as they are.
To use it, press Alt+Ctrl+O anywhere in Scala file, then choose options for optimizing (file, or all files in a folder).
Before |
After |
---|---|
|
|