开发者

How to switch off Auto Import with IntelliJ/Scala Plugin

开发者 https://www.devze.com 2023-03-10 08:36 出处:网络
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 a

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:

How to switch off Auto Import with IntelliJ/Scala Plugin


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
0

精彩评论

暂无评论...
验证码 换一张
取 消