Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Enhanced Scala Interaction Mode for Emacs

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.md

ENSIME

the ENhanced Scala Interaction Mode for Emacs

Links

Features

  • Highlight errors and warnings in your code buffers.
  • Inspect the type of any expression.
  • Browse packages
  • Completion for variables, methods, constructors, etc.
  • Incrementally search through classpath symbols
  • Find references to a symbol
  • Jump to symbol definitions.
  • Automated Refactorings (rename, organize imports, extract method)
  • Source Formatting
  • AST-based selection
  • Supports sbt,Maven,Ivy projects
  • Embedded sbt shell
  • REPL
  • Debugger

Demo Videos

System Requirements

  • Emacs 22 or later.
  • Unix-like OS or Windows.
  • Java Runtime
  • A Scala 2.8.1 compatible project.

Documentation

Quick Start

1) Install scala-mode

ENSIME is designed to compliment scala-mode (or any other scala language mode). scala-mode can be found in the Scala distribution under ./misc/scala-tool-support/emacs/. The rest of the steps assume your scala-mode is installed and working correctly.

2) Install ensime-mode

Download the ENSIME distribution from the github downloads page. Unpack the ENSIME distribution into a directory of your choosing.

Add the following lines to your .emacs file:

;; Load the ensime lisp code...
(add-to-list 'load-path "ENSIME_ROOT/elisp/")
(require 'ensime)

;; This step causes the ensime-mode to be started whenever
;; scala-mode is started for a buffer. You may have to customize this step
;; if you're not using the standard scala mode.
(add-hook 'scala-mode-hook 'ensime-scala-mode-hook)

;; MINI HOWTO: 
;; Open .scala file. M-x ensime (once per project)

3) Verify Permissions

Verify that the startup script (usually bin/server.sh) has executable permissions.

4) Create Project

In Emacs, execute M-x ensime-config-gen. Follow directions in the mini-buffer to create a .ensime file for your project..

5) Start ENSIME

Execute M-x ensime You only need to do this once per project.

Developer Quick Start

Note: This section is for people who want to hack on ENSIME itself.

After cloning, and before you can run ENSIME, you must create the distribution directory structure. The sbt task 'stage' will create the directory 'dist' underneath the root clone directory. Then, follow the install instructions in section 2.2 above, substituting CLONE_DIR/dist as the root of your ENSIME distribution.

The work-flow I use when hacking ENSIME:

  • Edit source files
  • 'sbt update'
  • 'sbt dist'
  • Stop existing ENSIME server by killing inferior-ensime-server buffer
  • Restart ENSIME with M-x ensime
Something went wrong with that request. Please try again.