- JDK 1.8+
- Emacs 24.5+
- Scala 2.10.6+ / 2.11.11+ / 2.12.3+
- JDK 1.8+
- Emacs 24.5+
- Scala 2.11.11+ / 2.12.3+
Note that “stable” means “versioned release jars exist”, not “it has less bugs”. Indeed, bugs are considered “documented behaviour”.
The recommended way to install ENSIME is via MELPA stable and
(use-package ensime :ensure t :pin melpa-stable)
If you used the sample Emacs configuration from our Learning Emacs section, then you can add the above code to the end of your
~/.emacs.d/init.el file and restart Emacs (or
If you already installed
M-x list-packages, then you need to delete your
~/.emacs.d/elpa/ensime* folder, restart Emacs, and follow these instructions.
For the server installation to work, make sure
sbt is on your
PATH environment variable or
exec-path Emacs variable, e.g. on OS X this may mean adding:
(add-to-list 'exec-path "/usr/local/bin")
or set the sbt command explicitly
(setq ensime-sbt-command "/path/to/your/sbt.bat" sbt:program-name "/path/to/your/sbt.bat")
Basic Scala support is provided by
scala-mode which provides many features specific to Scala major mode editing and sbt support is provided by
sbt-mode. Both modes can be used independently of ENSIME and you are encouraged to read their standalone documentation to understand the role that they play.
Note that “unstable” means “it does not have versioned releases”, not “it will crash a lot”. You are expected to fix bugs you encounter.
To use the unstable version of ENSIME from MELPA, change to
(use-package ensime :ensure t :pin melpa) (use-package sbt-mode :pin melpa) (use-package scala-mode :pin melpa)
and read the documentation for your build tool plugin (which is now the server installer) for additional steps that you need to make.
Note that the ensime-server
3.0.0-SNAPSHOT releases are incompatible with the emacs client, blocked by use SWANKY.
We would rather that you used stock Emacs with
evil-mode. However, if you still choose to use Spacemacs, you must add these lines to your
dotspacemacs/user-init to mimic the configuration above.
(push '("melpa-stable" . "stable.melpa.org/packages/") configuration-layer--elpa-archives) (push '("ensime" . "melpa-stable") package-pinned-packages)
Please do not raise bug reports unless you can reproduce with stock Emacs, because none of the core contributors use or understand Spacemacs.
Compile your project with your build tool and generate a
.ensime file (which also installs / updates the server component). Then navigate to a file or directory in your project and type:
Check that again. It is very important that you compile your project and have generated a
.ensime file from one of the supported build tools.
The first time you use ENSIME, you can expect to wait several minutes for the server and all of its dependencies to be downloaded.
On first use for a project, you will need to wait a few moments for indexing to complete.
Once the server is available, enjoy editing with the ENSIME commands that are documented in the User Guide and consider using some of the suggestions in our Hacks page to improve your productivity in Emacs when editing Scala code.