We know that you have been waiting for SBT project support in IDEA too long. That’s why we make SBT plugin nightly builds available even before an actual release of the plugin.
Though work on SBT plugin is still in progress, the following features are already available:
- SBT project import.
- Incremental project model updating.
- Auto-import (on project definition changes).
- Editing of
.sbt files (with full highlighting, auto-completion and navigation).
Many more features are on the way (see the roadmap below).
SBT plugin is currently available for IDEA 12 (“Leda”), the plugin builds for the IDEA 13 EAPs are coming soon.
You can use any of the following methods to install or update the plugin in IDEA:
- Automatic updates (recommended)
Add the following URL to the list of custom plugin repositories in Settings | Plugins | Browse Repositories | Manage Repositories:
After that, you may install the plugin via Settings | Plugins | Browse Repositories.
IDEA will check for the latest plugin builds automatically.
- Manual download
Get the latest build from SBT plugin nightly builds page and install the downloaded archive via Settings | Plugins | Install plugin from disk.
- Build from sources
If you are eager to get the latest snapshot of the plugin, you may use SBT plugin project on GitHub to clone the plugin repository by entering the following command:
git clone https://github.com/JetBrains/intellij-sbt.git
sbt dist to build a binary distribution of the plugin (you may need to specify locations of IDEA and Scala plugin first).
To import an SBT project in IDEA use either File | Open or File | Import Project menu command and then choose a desired
build.sbt file (alternatively, you may choose a project root directory).
IDEA will analyze the SBT project structure and create a corresponding project model that includes all required modules, source/output directories, libraries, dependencies, etc.
If you select Use auto-import check-box in the import dialog, IDEA will monitor the SBT project definition for changes and update the corresponding project model automatically (preserving your local modifications to the project).
In addition to ordinary modules (which correspond to SBT “projects”), IDEA creates special “SBT” modules, which describe SBT build definitions themselves (
.sbt files and Scala files in
project directories) in order to provide highlighting, auto-completion and navigation for these files and SBT libraries.
Here are the features that we’re going implement in the near future:
- SBT console.
- Command tool window.
- Project make via SBT.
Keep in mind that SBT plugin project is currently in alpha stage, don’t be too hard on it
Please, report bugs and submit feature requests to our YouTrack (set “SBT” as a subsystem).
Post ideas and questions to our forum.
Complete plugin code is available as a project on GitHub.