-
Notifications
You must be signed in to change notification settings - Fork 18
Closed
Labels
Description
The SoS CodeMirror mode, as defined in kernel.js, is a Python mode + magic and SoS statements. It does not highlight code in other languages correctly. In theory, we should
- use
Rcode mirror mode (plus magics) forRcells, and so on. - Recognize SoS actions and highlight lines after
R:as R code etc. It should in theory also recognizeexpand=Trueetc to correctly identify and highlightSoSexpressions.
Item 1 could be done when the language of a cell is switched. We should be able to create new codemirror mode and switch to it. There is however a slight problem with the name of the language (e.g. R) might not match name of code mirror.
Item 2 could be done with nested codemirror mode, and there are examples such as htmlmixedmode.