Search code examples
scalaintellij-idea

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?


Solution

  • 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.