SBT plugin for configuring IDE settings
March 2, 2026 ยท View on GitHub
This plugin provides keys to configure IDE settings. Available for sbt 0.13.5+, sbt 1.x and sbt 2.
Usage
- Add the following lines to
project/plugins.sbt:
addSbtPlugin("org.jetbrains.scala" % "sbt-ide-settings" % "1.1.4")
- Tweak any settings you want
Available settings
-
ideExcludedDirectories : Seq[File]List of directories to be marked as excluded in IDE.
-
idePackagePrefix : Option[String]If package prefix is
org.example.application, aPATHis a source directory impliesorg/example/application/PATH, so you don't have to createorg,example, andapplicationsubdirectories (more info). -
ideBasePackages : Seq[String]List of packages to be used as base prefixes for chaining. Packages starting with one of these prefixes will be chained automatically in IDE.
-
ideSkipProject : BooleanFlag indicating that current subproject should be skipped from importing.
-
ideOutputDirectory : Option[File]Directory to use for production and test output instead of SBT's
targetdirectory.
Using the settings without plugin
All the settings in this plugin are simply flags that are respected by IntelliJ IDEA on project import. They can be added to a project as a setting without including this plugin in the following format:
SettingKey[Seq[File]]("ide-excluded-directories") := Seq(file("some/file"))
SettingKey[Option[String]]("ide-package-prefix") := Option("org.example.application")
SettingKey[Seq[String]]("ide-base-packages") := Seq("package1", "package2")
SettingKey[Boolean]("ide-skip-project") := true
SettingKey[Option[File]]("ide-output-directory") := Option(file("some/file"))