Right click on your project, “Add Framework support” and choose Scala framework, then by right click on the packages you can create Scala Class.
After this, right click on src > Mark directory as > Sources Root.
Doing both of these should fix your problem!