zwild / ob-ammonite

org-babel for scala evaluation in Ammonite
GNU General Public License v3.0
14 stars 2 forks source link

Syntax Highlighting for amm block code ? #3

Closed reyman closed 4 years ago

reyman commented 4 years ago

Thanks for this package, after discussion with dev of doom-emacs, amm is automaticly detected in org-babel block of source code.

One problem persist, syntax highlighting don't work after export, for example using ox-hugo, after export of source code block in markdown, "amm" langage is not recognized by any syntax highlighter...

sealed trait Maybe[+T]
final case object Empty extends Maybe[Nothing]
final case class Just[T](t: T) extends Maybe[T]

Any idea to solve that using org headers ?

zwild commented 4 years ago

You could try

(add-to-list 'org-babel-tangle-lang-exts '("amm" . "scala"))
(add-to-list 'org-src-lang-modes '("amm" . scala))

Or

(require 'ob-ammonite)
reyman commented 4 years ago

Hum, i'm not sure my message was clear, amm is recognized by org, but during export on markdown, markdown blocks indicate ```amm and not ```scala fence block

zwild commented 4 years ago

Hi, I think you could write your own function to do that convertion thing.