Since the combination of OS X, Scala, and IntelliJ appear to be a moving target in the development world, I figured I'd go ahead and jot down how I got them up and running on my MacBook Pro. First things first, I used IntelliJ 13 (Community Edition), with Scala 2.10.3, which I installed using Homebrew (I will detail it below). In addition, I'm using the latest Java 7 JDK for Mac OS X from Oracle.
First things first, use Homebrew to install Scala, including the documentation, like I have detailed below.
$ brew install scala --with-docs
You will likely see a line about where to point IntelliJ in the post install message, similar to this:
==> Caveats To use with IntelliJ, set the Scala home to: /usr/local/opt/scala/idea
And that's exactly what we are going to do...
Make sure that you have the latest version of the Java JDK installed, I just downloaded the appropriate JDK from Oracle's site.
Preparing and Installing IntelliJ
In order to get IntelliJ to work properly with the latest version of the Java 7 JDK, you need to edit the .app according to the instructions provided by the IntelliJ authors here. Almost there!
Starting a Scala Program
Now, that you have all of the tools installed, you need to start a Scala module in IntelliJ. Start by opening IntelliJ and starting a new Scala Module. Set the Project SDK path to the location of where you installed Java 7. Mine was:
Next, select Set Scala Home, and point it to the location of your Scala install, which was pointed out to us by Homebrew during our earlier install. In my case it was:
IntelliJ should autodetect the necessary libraries and documentation path. Fill out the remainder of your projects information (name, etc), and then click Finish to get started.