jupyterlab-lsp
jupyterlab-lsp copied to clipboard
Support for Autocomplete in JupyterLab Real-Time Collaboration (RTC) Environment
Background
Hello
We are trying to build an SQL editor client for our users in the form of a JupyterLab extension. We are using jupyterlab-lsp to provide editing capabilities inside notebook cells (P.S. thank you for the amazing work your team is doing, your extension is super helpful!).
Question
I wanted to ask about the autocomplete capability provided by LSP.
We are using @joe-re/sql-language-server as a language-server running in the background. We wanted to provide autocomplete capability to our users inside JupyterLab (RTC)[https://github.com/jupyterlab/jupyter-collaboration] environment. However, there are two cases which make the problem peculiar:
- We want different users to be able to use the same notebook (but different cells) and receive autocomplete suggestions at the same time.
- We want those users to be able to connect to different SQL engines (I believe
sql-language-serverhas support for multiple data connections + it provides a way to shift between those connections) so that different users get separate autocomplete suggestions at the same time.
Since jupyterlab-lsp provides the autocomplete capability by communicating with language-server, I was wondering is such a solution possible in JupyterLab's RTC environment?
Further, do you know if such a solution is possible if we directly communicate with the sql-language-server (skipping the jupyterlab-lsp layer)?
Thanks a lot in advance. Your help will be greatly appreciated!
Yes, this might be possible in the future, but not out of the box now. In the single jupyter-server RTC scenario (a) each user could connect to a new LSP server instance and (b) each user could modify the settings. Both (a) and (b) would need to be implemented, with (b) possibly being a feature of jupyter-collaboration.
Further, do you know if such a solution is possible if we directly communicate with the sql-language-server (skipping the jupyterlab-lsp layer)?
Possibly, but it will come with its own headaches.