Easy Org Ensime (eoe) aims to make literate programming work again for
Scala. With this mode you can define a custom build.sbt file, run
eoe-run
and use org-mode for literate programming in Scala.
- Install dependencies.
- Install org-mode using
M-x package-install org-plus-contrib
- Install async using
M-x package-install async
- Install ensime using
M-x package-install ensime
- Install sbt in your distribution: https://www.scala-sbt.org/1.0/docs/Setup.html
- Install the sbt-ensime plugin: http://ensime.github.io/build_tools/sbt/
- Install org-mode using
- Add
(load-file "<pathToEoe>/easy-org-ensime.el")
to your init file. - Define your build.sbt in the
eoe-dir
(by default it is โ/tmpโ)lazy val root = (project in file(".")). settings( inThisBuild(List( libraryDependencies += "org.scalaz" %% "scalaz-core" % "7.2.25", scalaVersion := "2.12.6", version := "0.1.0-SNAPSHOT")), name := "test" )
- Then run
(eoe-run)
- Check org-mode can now call scala fragments by calling C-c C-c on the following block:
import scalaz._ import std.option._, std.list._ Apply[Option].apply2(some(1), some(2))((a, b) => a + b)
Note that many things need to be done to make this library cooler: check (and contribute please) to the issue tracker.
Enjoy literate programming!