SBT project different depending on whether project was checked out internally or externally to Intellij


I'd like to understand the reason why the following happens: when I clone nSBT project from my remote repository, Idea will quickly identify it as SBT and open it in the corresponding way (colouring and formatting classes as necessary). In that setting, when I try to add a new Scala class to my package I won't be given the opportunity (the list of file types under New > when right-clicking will not include Scala Class -- although it will in clude Scala Script and Scala Worksheet).

On the other hand, if I clone the same project externally to Idea, and import it as an SBT file, in the same project I'll be given the opportunity to create a new Scala file.


The first (cloning from within Idea) would be my preferred choice, and I'd like to understand if there is anything I am missing and/or how to rectify the issue.


Thanks in advance.

1 comment
Comment actions Permalink

Hi, thanks for the report. Unfortunately I can't reproduce it. I tried with two different sbt projects, cloned them via IDEA, opened the build.sbt file and clicked import. In both cases I can now create Scala classes from the context menu. Does this only happen for specific projects for you? If so, please provide a link.

Also, have you tried refreshing the sbt project manually, or importing it again from sources?


Please sign in to leave a comment.