vatlab / sos-notebook

Multi-language Jupyter Notebook
http://vatlab.github.io/SoS
BSD 3-Clause "New" or "Revised" License
176 stars 17 forks source link

Is sos-notebook compatible with jupyterlab-lsp? #296

Open rezaeir opened 4 years ago

rezaeir commented 4 years ago

I just read a Medium article about jupyterlab-lsp extension for Jupyterlab which greatly improves some basic IDE features in jupyterlab environment. I instantly was very curious and eager to check at it out and start using it. However, at the end of the article it mentions that there are some compatibility problems between this extension and the other active jupyterlab extensions. Because I actively use the sos-notebook in my environment, I wanted to first know if you have checked this extension already and if it gets along well with sos-notebook or not?

BoPeng commented 4 years ago

I have not personally tried this module but this is an extension that the core team has been eyeing at, perhaps also contributed to to add more language-related features such as linting. The core feature of sos, namely allowing multiple notebooks in one notebook and data exchange between kernels, are not in the scope of lsp (at least not right now).

On the SoS side I have been thinking of adding a few features such as linting but stopped because they are complex issues that are well beyond the scope of SoS. In the end features like %preview was added to preview variables etc but they were "patches" within the classic jupyter framework, but would appear less useful with more comprehensive solutions that LSP will provide, under the more powerful JupyterLab framework.

There is indeed a chance that jupyterlab-lsp and jupyter-sos can conflict in some way but I have full intention to make them work together even if I have to remove some features and point users to jupyterlab-lsp. Please feel free to report here if you notice some related problems.

rezaeir commented 4 years ago

Thanks for your explanation. Alright, then I make a separate, from my rna-seq workflow, env in Ubuntu 20.04 WSL 2 and install both sos and lsp on it and will report any problem which seems to happen because of the combination of sos and lsp.

BoPeng commented 4 years ago

I have overheard discussions on this extension from the core developers and did not realize that it is already at a level that is usable. I will install and test it as well.

BoPeng commented 4 years ago

Well, just tried.

The sad news is that lsp does not work for the SoS kernel, because it does not know what language SoS is. I will have to ask the LSP guys if it is even possible to notify LSP the language of each cell.

BoPeng commented 4 years ago

https://github.com/krassowski/jupyterlab-lsp/issues/282

rezaeir commented 4 years ago

I also just checked that and it doesn't recognize SoS kernel unfortunately. However, it is so slow that even in the single python-kernel notebook it works super slow in popping up hints and references. For r-kernel, it even doesn't fully initialize and indicates "partially initialized!!". I think it is still not usable!! But I'm gonna follow their updates and see how it goes.