Syntax highlighting, syntax checking and prompting
Highlighting
The themes should be automatically generated from grammar for the target platforms Visual Studio Code and Jupyter. For Jupyter it seems that there are two packages enabling syntax highlighting:
- CodeMirror for Jupyter Notebook and Jupyter Lab
- Pygments for Jupyter Console
As an example, let us take the Octave highlighting in Jupyter. The Octave support is implemented in these two packages for Notebook/Lab and Console, respectively:
- https://codemirror.net/5/mode/octave/index.html
- https://pygments.org/docs/lexers/#pygments.lexers.matlab.OctaveLexer
According to this information, the "implementation" of syntax highlighting in the vre-language package is reduced to configuring the kernel's language_info attribute and adapting the kernel.json file accordingly.
The authors of pygments package recommend writing a plugin for pygments. Several existing plugins can be used as blueprints:
- https://github.com/pygments/pygments-plugin-scaffolding (the template provided by pygments)
- https://github.com/ipython/ipython-pygments-lexers
- https://github.com/doconce/pygments-ipython-console
Support from textx
There is some highlighting support for textx-based languages, currently only for textmate, in this package.
Syntax check
Implemented in !402 (merged)
Prompting
Implemented in !402 (merged)