Here you can find complete guide how to start writing patches (or to creating your own Scala plugin builds) to IntelliJ IDEA Scala plugin.
1. Checkout project. You can checkout from our GitHub repository: https://github.com/JetBrains/intellij-scala
2. There are few branches for different Major IDEA releases. Currently master is for IDEA 13.
3. You can use any IDEA version with any installed Scala plugin, just open Scala plugin project in IDEA
4. Now you need to check, that your JDK contains required for development JDI library, for Windows or Linux you have to add tools.jar from jdk/lib, for Mac you don't need to add anything
5. Now you need to setup path variables for Scala plugin project. For IDEA 13 it's CARDEA_HOME variable, and LEDA_HOME for IDEA 12 branch:
6. Now you can just run/debug IDEA run configuration.
7. To run tests change JUnit defaults according to TypeInferenceTest run configuration (VM options, Working directory, module, before launch settings).
8. To construct Scala plugin jar from sources use ScalaProduction artifact, for Play plugin use Play2Production artifact (Build -> Build Artifacts...)