Contributing

Working with the Atom ENSIME Source

The basic cycle for interactive hacking on Atom ENSIME is: checkout the project (or a fork), install the package from your fork. Then: make edits, re-load Atom, repeat. Feel free to chat on gitter, and send a pull request.

Atoms package manager apm has a convenience command for woking on Atom packages. By running apm develop ensime <path-to-clone-to> it will clone ensime/atom-ensime to the specified location, install its dependencies, and link it into Atoms package directory.

Alternatively you can perform these steps manually:

Once you’ve cloned and linked the code you can start developing

Developing ensime-client node package in parallel

When developing ensime-atom, chances are high you will most likely need to develop the node package ensime-client in parallel. This npm package was recently pulled out from ensime-atom to be a shared client lib for the node environment to use both in ensime-atom and a planned ensime-vscode.

To make the development smooth you will probably want to follow similar instructions as these:

https://atom.io/docs/latest/behind-atom-developing-node-modules

Specific example of these follow.

Notice that as part of pulling these things out, the ensime-client is no longer depending on Atom’s automatic compilation of coffeescript. It instead uses grunt to compile the coffescript into js that is exported. Therefore you’ll need to set up a watch task as well.

On the ensime-atom side:

The npm link business is basically just this:

/Users/viktor/dev/projects/atom-ensime/node_modules/ensime-client -> /usr/local/lib/node_modules/ensime-client -> /Users/viktor/dev/projects/ensime-node

where ensime-node is my checked out git repo.

Use server assembly jars

See the server docs if you need to build your own server.

Tricks and Tips

Access ENSIME from the console

In the developer console, you can look up the package like this:

e = atom.packages.getActivePackage('Ensime').mainModule

From there you can access other parts of the package. E.g.,

client = e.clientOfEditor(atom.workspace.getActiveTextEditor())

Inspiration (steal if you can)



[edit]