Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax highlighting working only for Python cells and not for Julia and R. #351

Open
mg104 opened this issue Oct 22, 2023 · 4 comments
Open

Comments

@mg104
Copy link

mg104 commented Oct 22, 2023

I've installed the latest docker image for sos-notebook on my ubuntu 22.04 machine, but the notebook with sos-kernel is providing syntax highlighting only for Python code (when the Python code is inside python cell, as well as in a Julia or R cell; for example: "for" and "print" is highlighted even when I write these statements inside a Julia cell). When I create a Julia notebook, the syntax highlighting is happening correctly.
I've tried all possible methods of troubleshooting but haven't got any success. Could this be a feature that hasn't been added to the sos-notebook?

@mg104
Copy link
Author

mg104 commented Oct 22, 2023

Following is a snippet of how code appears in an SOS-notebook:

image

@BoPeng
Copy link
Contributor

BoPeng commented Oct 22, 2023

This is a known issue (vatlab/jupyterlab-sos#65 (comment)) for JupyterLab 4.x, which adopts codemirror 6.x that is incompatible with codemirror 5.x. I am in the process of rewriting the sos language mode (https://github.com/vatlab/codemirror-sos ) which is a serious undertaking and will take a while to complete.

@BoPeng
Copy link
Contributor

BoPeng commented Oct 24, 2023

Please upgrade to jupyterlab-sos 0.10.1 and let me know if the problem persists. Note that this version still does not support highlighting sos related features (e.g. %expand) but it uses the right codemirror mode for subkernels.

@mg104
Copy link
Author

mg104 commented Oct 24, 2023

Hi Bo,

Thanks so much for your clarification and help! I tried jupyterlab-sos 0.10.1 and the issue has got resolved as shown in the below snippet:

image

Its just that the R code is not highlighted (actually it seems that Jupyterlab doesn't support highlighting R code, because this is not just happening in the SOS notebooks but also in R notebooks in the jupyterlab.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants