No automatic highlighting for source files of SBT project

Answered

Hi,

I am working in an SBT project, and since updating to Java 17, the files inside the source folder are no longer automatically syntax highlighted. In the upper right corner when hovering over “OFF” button, it tells me highlighting is disabled and no analysis has been performed. See picture:

 

I now have to manually enable the highlighting through this menu in the picture for each of the files that I open which is quite annoying. I have already tried running analysis on the project through Code > Inspect Code but this doesn't help. Any idea how I can fix this issue? Thanks in advance.

0
4 comments

Can you please check the Project Structure → Modules page and make sure the src/main/scala folder is marked as “Source  Folder”?

0

Hi! Thanks for responding, I have checked and it seems to me everything in the modules page is set up correctly (for me the source directory is app/ instead of src/main/scala). See picture attached:

0

Please check the SCL-19340 YouTrack Issue, where a very similar problem is currently being investigated.

If the solutions suggested there won't help, could you please share a reproducer Project, so we can investigate this further?

 

1

Thank you so much!! I was in the middle of creating a reproducer project, but disabling `scala.compiler.highlighting.suppress.java.highlighting` fixes the issue! I feel kind of dumb I wasn't able to find that YouTrack issue myself.

Anyways, thanks again for the help and quick response!

0

Please sign in to leave a comment.