Scala development with GitHub’s Atom editor
Basic features such as Scala syntax highlighting are provided by the language-scala plugin.
Navigation and completion
While there are multiple sbt plugins for generating ctags, the easiest seems to be to have Ensime download the sources (more on that below) and invoke ctags manually: put this configuration in your home directory and run the ‘ctags’ command from your project root.
This is useful for searching for symbols, but limited for finding declarations: for example, when checking the declaration for Success, ctags doesn’t know whether this is scala.util.Success, akka.actor.Status.Success, spray.http.StatusCodes.Success or some other 3rd-party or local symbol with that name.
This is where the Ensime plugin comes in.
Start the Ensime server from Atom with ‘cmd-shift-p’ ‘Ensime: start’. After a small pause the status bar proclaims ‘Indexer ready!’ and you should be good to go.
At this point the main features are ‘jump to definition’ (alt-click), hover for type info, and auto-completion:
There are some rough edges, but this is a promising start based on a solid foundation.
While Atom is already a pleasant, modern, open source, cross platform editor, it is clearly still early days.
The Scala support in Atom is not yet as polished as in IDE’s such as IntelliJ IDEA or as stable as in more mature editors such as Sublime Text, but is already practically useful and has serious potential. Startup is not instant, but I did not notice a ‘sluggish feel’ as reported by earlier reviewers.
Feel free to share your experiences in the comments, I will keep this post updated as the tools – and our experience with them – evolve.
Look at our consultancy services, training offers and careers below or contact us at email@example.com