How to stop Intellij from automatically running SBT

I would leave the autoimport checkbox unchecked when importing a SBT project.

In this way, it doesn’t refresh automatically, it must be done by hand.

In order to change it, after it has been imported, you can edit by hand the .idea/sbt.xml file:

<project version="4">
  <component name="ScalaSbtSettings">
    <option name="linkedExternalProjectsSettings">
      <SbtProjectSettings>
        <option name="externalProjectPath" value="$PROJECT_DIR$" />
        <option name="jdk" value="1.7" />
        <option name="resolveClassifiers" value="true" />
        <option name="useAutoImport" value="true" />
      </SbtProjectSettings>
    </option>
  </component>
</project>

and change the useAutoImport setting.
If necessary, restart IDEA.

UPDATE: Also in the settings page, search for SBT, and there you can enable or disable auto-import of SBT files.

When doing heavy work on a .sbt file, I disable auto-import.

Leave a Comment