[IPython-dev] IScala: a Scala-language backend for IPython
Mon Sep 9 11:27:21 CDT 2013
Le 9 sept. 2013 à 18:08, Mateusz Paprocki a écrit :
> On 8 September 2013 22:49, Matthias BUSSONNIER
> <email@example.com> wrote:
>> 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.
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...
More information about the IPython-dev