averbis / IRuta

A UIMA Ruta kernel for Jupyter Notebook.
Apache License 2.0
7 stars 1 forks source link

Syntax Highlighting does not work in JupyterLab #6

Open DavidHuebner opened 3 years ago

DavidHuebner commented 3 years ago

Describe the bug In Jupyterlab, syntax highlighting does not work at all.

Expected behavior Syntax highlighting should work.

DavidHuebner commented 3 years ago

This issue seems more severe than initially expected. The problem is that there is no support in JupyterLab for the kernel.jsmechanism that we use to inject the syntax highlighting in the current version of IRuta (0.2.0). Please also see this open issue: https://github.com/jupyterlab/jupyterlab/issues/3010

Hence, we would need to completely rethink our code highlighting. Possible options are

1. Write a JupyterLab Extensions

Advantage: High flexibility - may also be required for the AnnotationViewer (see #7 ) Disadvantages: Severe overhead (in terms of code and installation procedure) & problems with Binder integration

2. Implement our own Language Server for Ruta OR write a CodeMirror mode Advantage: May also be used in other context (e.g. syntax highlighting in other platforms) and for other use-cases (code completion, help, etc.) Disadvantage: Complexity?

For now, we should recommend using Jupyter Notebook for IRuta instead of JupyterLab.