[IPython-dev] how to implement syntax highlighting for a new language
Robert Dodier
robert.dodier at gmail.com
Tue Aug 18 20:37:47 EDT 2015
Hi Thomas, hi everyone,
> Codemirror is the JS text editor we use for notebook cells. Many
> kernels can just specify one of the modes codemirror already
> provides: https://codemirror.net/mode/
>
> If there isn't a suitable mode already in codemirror (it doesn't look
> like there's one for Maxima), you'll need to provide one.
I have createdd a mode for Maxima by modifying one of the existing modes,
but it doesn't seem to be activated -- stuff is shown without highlighting.
I'm expecting that stuff I type into an input cell will be colorized --
that's the way it is supposed to work, right?
How is IPython supposed to activate or trigger CodeMirror?
Perhaps I'm missing something very obvious. I tried copying the
CodeMirror-related stuff from Fishbowl (the project from which I
forked Maxima-Fishbowl) but nothing happens. What I'm not
understanding is, what is the magic in IPython which causes
CodeMirror to be applied to stuff. Thanks in advance for any
light you can shed on this question.
best,
Robert Dodier
More information about the IPython-dev
mailing list