简体   繁体   中英

IntelliJ IDEA Scala plugin doesn't find errors

I've just tried IntelliJ IDEA 12 with the Scala plugin, but it doesn't find and highlight errors in my code. I can for example write arbitrary code in a method and it looks like everything is fine. Is IDEA not able to do this? Or do I have to configure something special?

IDEA's Scala plug-in is not equivalent to the compiler in type-checking your source code, but it does pretty well. The one thing you'll want to do (unless, perhaps, your hardware is not fairly current and high-performance) is turn on "Type-Aware Highlighting."

If you look in the lower-right-hand corner of the IDEA window (when you're editing a project with Scala enabled) you'll see one of two icons, both of which take the form of a square-bracketed bit of text. That text is either blank on a yellow background or the letter T on a green background. Clicking it toggles between those two states. When the green T is displayed, Type-Aware highlighting is on.

Give that a try.

Simply updating the plugin version could fix the problem. Old or install/initial plugins may not contain relevant support.

Determining Scala plugin version in Settings

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM