Code Monkey home page Code Monkey logo

ensime-emacs's Introduction

ENSIME

ENhanced Scala Interaction Mode for Emacs.

This project provides the Emacs support for the ENSIME server and currently shares the same issue tracker. This project is actively community maintained, and we are very pleased to see contributions from new members. Please visit the server's github page to find out more about how you can help.

ENSIME brings IDE-like features to your favourite text editor, such as:

  • Show the type of the symbol under the cursor.
  • Contextual completion for vars, vals and defs.
  • Add an import for the symbol under the cursor.
  • Fast classpath search (types and members).
  • Jump to source code or documentation.
  • Browse packages and type hierarchies.
  • Find all references to a symbol.
  • Refactorings (rename, organize imports, extract method).
  • REPL with stack trace highlighting.
  • Errors and warnings in your code: red squigglies.
  • Debugging

and many more.

Quick Start

There are two ways to install this extension. You can use MELPA (recommended):

;; if you're new to the MELPA package manager, include this in your `~/.emacs` file to add it
(require 'package)
(add-to-list 'package-archives
	     '("melpa" . "http://melpa.milkbox.net/packages/") t)
(package-initialize)

(when (not package-archive-contents)
  (package-refresh-contents))

;; restart emacs and then do M-x package-install [RETURN] ensime [RETURN]

Or fork and clone this repository into a directory of your choice and add it explicitly into your ~/.emacs (developer front-end install, manual dependency management):

;; assuming you put the repository in ~/.emacs.d/ensime
(add-to-list 'load-path (concat user-emacs-directory "ensime"))

In either case, add the following to ~/.emacs to enable ensime:

(require 'ensime)
(add-hook 'scala-mode-hook 'ensime-scala-mode-hook)

Much of the actual text editing is provided by the excellent scala-mode2, which can be customised.

Getting Started

A project needs to have a .ensime configuration file. Luckily we have a plugin for SBT projects and maker provides out-of-the-box support, which will automatically create an appropriate .ensime config. The example .ensime configuration documents the available entries and options.

We would love to receive user-contributed maven and ivy generators.

For best behaviour, the ENSIME server needs to be running the same version of scala that your project uses. The default version of scala is defined by ensime-default-scala-version but you can specify this per-project with :scala-version "2.9.3" in .ensime.

Then simply M-x ensime and point it at your project config, which may download the latest ENSIME server for the specified version of scala. If the download fails, or you want to use a specific version of the server, install the developer version following the instructions on the ENSIME server github page.

Once the server is available, wait for the analyzer to complete and enjoy editing with the ENSIME commands that are conveniently summarised in our ENSIME Quick command reference (or read it straight from the source).

Emacs-wide customisations are defined in ensime-vars.el and will appear in M-x customize.

Keeping up to date with releases is recommended. Melpa manages upgrading of packages and if you're running from source you will need to git pull --rebase upstream master regularly.

Before reporting any problems with ENSIME, please:

Further Information

Although the ENSIME's options are fully documented in the emacs customization pages (M-x customize RET "ensime"), you may also wish to read the ENSIME User Manual.

Older releases are bundled with the server.

ensime-emacs's People

Contributors

aemoncannon avatar fommil avatar xeno-by avatar rajish avatar gneuvill avatar tototoshi avatar jfager avatar marcsaegesser avatar fabianpage avatar rorygraves avatar djspiewak avatar fanatoly avatar mdr avatar peluko avatar tbje avatar scottyb avatar marcweber avatar fgeller avatar pashky avatar hmgibson23 avatar wspringer avatar snapcracklepopgone avatar stew avatar markschaake avatar waffle-iron avatar jackcviers avatar mechkg avatar hgiddens avatar hubertp avatar habib avatar

Watchers

Julian Gosnell avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.