See also the tutorial Getting Started with Play 2.0 to learn how to create web applications with Scala.

Getting Started with Scala in IntelliJ IDEA

Before you perform the tutorial's steps we recommend you to watch the video with a quick overview of Scala support in IntelliJ IDEA.

1. Install plugin

Before you create your first Scala application make sure

Scala
plugin is installed and enabled via
Settings
Plugins
.

2. Create Scala project with project wizard

Open

Project Wizard
and select Scala template. Specify home directory for Scala. If you don't have it, you can get it via Download button.

It will be easier next time to create applications if you select to make global libraries.

3. Check project libraries

Open

Project Structure
and check the project libraries. Here you can configure additional libraries, e.g. ScalaTest or any others.

Check compiler settings

In

Scala Facet
settings you can check
Compiler options
.

4. Create object

The easiest way to create Scala file, worksheet or script is to use

Ctrl
+
N
shortcut from
Project View
or
Navigation Bar
.

Choose between class, object and trait with

Up
and
Down
arrows.

5. Run application

The fastest way to run the code at cursor is to use

Ctrl
+
Shift
+
F10
shortcut.

Alternatively you can use the context menu.

See also the tutorial Getting Started with Play 2.0 to learn how to create web applications with Scala.