Tuesday, August 17, 2010

Pencils down

Phew! GSOC 2010 is over. I've had a lot of fun working on ENSIME this summer, and I'm really excited about some of the new features. Here's a quick overview of what's been added:

Project configuration:

ENSIME can now find dependencies declared via sbt, Maven or Ivy.

The M-x ensime-config-gen automates the creation of a .ensime configuration for your project.

Type/Package Inspector:

The inspector now alerts you when an interface is provided via implicit resolution.

There's now a toggle link to switch between a type and its companion object.

Type arguments are linked separately.

Nested types are listed for each interface.

Completion:

Symbol and member completion much more reliable.

Completion candidates are prettier.

Method parameter help is displayed in the minibuffer when completing a call.

Incremental Builder:

Added a stand-alone, incremental builder based on scala.tools.nsc.interactive.BuildManager

Errors and warnings are displayed in a hyperlinked read-out after each build/rebuild.

Refactoring support:

Mirko Stocker's stand-alone refactoring library has been integrated.

Rename, Organize Imports, Extract Method, Inline Local are all just an Emacs command away.

SBT integration:

Ray Racine's inferior sbt mode for Emacs has been integrated.

There's an elisp-hacker-friendly interface for sending commands to sbt.

Debugger integration:

JDB can now be controlled using graphical breakpoints and run/step/next shortcuts.

class->source and source->class mapping are handled intelligently, so setting breakpoints in anonymous functions works as it should.

REPL integration:

Scala REPL can be launched with your project's classes loaded.

If you want more information on any of these topics, please check the ENSIME manual.

And, of course, the work is far from done. There are still plenty of rough edges, and if you run into one, please open an issue at github. Or even better, fork the repo and send a patch! The meat of ENSIME is its Scala-based server component, so you don't even need to look at E-Lisp in order to contribute ;)

This summer was a great experience for me. I want to thank my GSOC mentor Hubert Plociniczak for his patient support, the organizers at Google for creating this program, and all the brilliant folks at EPFL for making Scala such a wonderful language to work with.

5 comments:

Hey, just wanted to say thanks - have been using ensime this past weekend and I like it. Too many shortcuts to remember in this emacs but an interesting combination.The thing I miss the most is an incremental file/class finder like eclipse ctrl+shift+t or this plugin http://muermann.org/gotofile/Do you know if there anything like that in the emacs world? Or is that something you could add to ensime, since you could make it type-aware?

Hi, thanks a lot for your great work on ensime. Although I'm just beginning, I'm really happy to be able to use emacs for Scala too.

I have a little problem with Yasnippet (Yas). To be able to use Yas in Python-Mode with Autocompletion (AC), I left TAB to AC and switched Yas to f8. That worked fine.

When I open a Lift/Scala project in ECB with Ensime and open a .scala file, I can use the menu and the mouse to insert Yasnippets, but the f8 key doesn't work anymore:"f8 is undefined"

But when I change to another buffer, i.e. inferior-ensime-server, C-h k f8 says:"f8 runs the command yas/expand, which is an interactive Lisp function in `yasnippet.el'"

On the other hand, the TAB in a .scala file is used by AC and not by Ensime:"TAB (translated from tab) runs the command ac-trigger-key-command, which is an interactive Lisp function in `auto-complete.el'"

But AC is not really working. When I turn off AC, Ensime TAB complete works again.

I don't really understand why the f8 is not working for Yasnippet in Scala files. And what would be a good way to combine Autocomplete, Yasnippet and Ensime completion?

This is a very nice blog. I hope I can make a blog like you. I amazed with the blog yours Dezmembrari auto Dezmembraripenet.ro shall not be held liable for any such content. However, Dezmembraripenet.ro respects the intellectual property,