Simple Problem: Ever since I switched to Idea 10.5, it has this auto import feature enabled. For a Java developer, this is surely nice, but every time I type thing like var x: Float
it automatically adds import java.lang.Float
on the beginning of the file. Very often, it even adds imports I did not even want, from unknown packages deep 开发者_如何学运维in my jar jungle, and prefers Java over Scala packages.
Played around with the switches in Code completion tab, but it keeps on doing this. How can I get rid of this?
That is plugin bug. This should be fixed soon. It's impossible to turn off in settings. Sorry for inconveniences.
In 2016.2.3 (Community Edition), this seems to have moved to the SBT pane:
Check "Code style" -> "Scala" -> "Imports" and "Editor" -> "Auto import" under Settings
On related note, to turn off auto import popup suggestion when the cursor is moved to line in intellij for mac:
Preferences -> Editor(Under IDE Settings) -> Auto Import -> Show Import Popup
精彩评论