[IPython-dev] IScala: a Scala-language backend for IPython

Matthias BUSSONNIER bussonniermatthias at gmail.com
Mon Sep 9 12:27:21 EDT 2013

Le 9 sept. 2013 à 18:08, Mateusz Paprocki a écrit :

> Hi,
> On 8 September 2013 22:49, Matthias BUSSONNIER
> <bussonniermatthias at gmail.com> wrote:
>> Hi,
>> Great to see that, happy that you were able to bind to IPython frontend.
>> You might be able to enable scala highlighting in notebook pretty easily
>> as code mirror support it.
>> Ask if you ned help.
> The support in CodeMirror is rather limited (only clike mode with
> Scala keywords), but sufficient for now. However, I don't see any
> wiring in notebook, because it doesn't take advantage of information
> sent in kernel_info message, unless I'm missing something.

well when you create a profile you can inject javascript (custom.js) that modify this : 


IPython.CodeCell.options_default.cm_default.mode = 'scala' // or whatever

Load scala mode fro codemirror. (if it c-like it slightly more complicated, but CM doc is nice for that)
And optionally (but we should fix that), loop through already existing cells to set their mode to Scala
(otherwise hightailing will be off unit you click once on the cell). 

There are a few other things  that IJulia does in its profile like allowing bang (!) as valid char in tokens for tooltips.
as well as adding metadata to the notebook metadata field telling the the notebook is julia (or scala in your case)
for future v3 > v4 conversion where language will be a notebook top level key.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20130909/963d17e4/attachment.html>

More information about the IPython-dev mailing list