GitHub - zwild/ob-ammonite: org-babel for scala evaluation in Ammonite
source link: https://github.com/zwild/ob-ammonite
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
ob-ammonite.el
org-babel for scala evaluation in ammonite-term-repl.
Install
brew install ammonite-repl
It is recommended installed by the MELPA package system.
You could install it by M-x
: with package-install
: ob-ammonite
.
Usage
#+begin_src amm :results org sealed trait Maybe[+T] final case object Empty extends Maybe[Nothing] final case class Just[T](t: T) extends Maybe[T] #+end_src #+RESULTS: #+BEGIN_SRC org defined trait Maybe defined object Empty defined class Just #+END_SRC
Config
If you edit you prompt in .ammonite/predef.sc
with
repl.prompt() = "scala> "
You should have this in your emacs config file.
(setq ob-ammonite-prompt-str "scala>")
With this discussion, please replace the scala in begin_src block with amm
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK