No Syntax Error Highlighting, what am I doing wrong?

Hi!

When I create a scala project, following the scala-plugin instructions, not a single syntax error is detected. For example:

object MyApp {
  val aNumber: Int = "hello"
}

does not detect any syntax error. If I right-click and ask it to compile, then I get the expected type mismatch error from the scala compiler.

This is just a silly example, no syntax errors are being flagged. For regular Java projects it works fine, so it must be scala specific. Interestingly, scala code completion works perfectly.

I have a clean install of IDEA 10 CE (tried with Ultimate as well) on a OSX 10.6 and Scala 2.8.1 final. I have set up the jdk in the project settings as well as the scala home when creating the project. The Scala facet is configured and I have both scala-library and scala-compiler in the dependencies (tried without the scala-complier as well). I have the latest version of the plugin (407).



I posted this at SOF before (http://stackoverflow.com/questions/4580887/scala-plugin-for-intellij-idea-10-not-detecting-simple-errors) but got no solution.

Thanks,

Alan

4 comments
Comment actions Permalink

You need to enable it.  Settings/Code Style/Scala/Other settings/Enable experimental error highlighting

Some things do show up as errors that aren't but not usually.

0
Comment actions Permalink

Worked!

I think this could be pointed out somewhere in the "getting started" page for the plugin. There is a natural expectation that error highlighting would be enabled by default.

Thanks!

Alan

0
Comment actions Permalink

8 years on I am suddenly experiencing the same problem with IDEA 2019.1.2 CE. There isn't the "Enable experimental error highlighting" option available so not sure where to do this - I have trawled the net for answers but no-go. Without type errors development is impossible so I am in big need of this. Thanks for any enlightenment!

0
Comment actions Permalink

Also I can see that the errors are being highlighted in another project so the doesn't seem to be the version or within the settings. How could one project have the errors highlighted correctly and the other not. I am wondering if I could have inadvertently pressed a shortcut to disable this. Absolutely any thoughts are welcome!

0

Please sign in to leave a comment.