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

Manually re-launching LSP servers #681

Open
Tracked by #985 ...
cccs-jc opened this issue Sep 18, 2021 · 4 comments
Open
Tracked by #985 ...

Manually re-launching LSP servers #681

cccs-jc opened this issue Sep 18, 2021 · 4 comments

Comments

@cccs-jc
Copy link
Contributor

cccs-jc commented Sep 18, 2021

We've noticed that sometimes the sql-language-server (LSP node server) we use stops or dies for some reason.

For example this will happen when putting a laptop to sleep. In this scenario it's not a big deal. We can just restart the jupyter lap process and a new LSP server is also created.

However in a JupyterHub environment it's very inconvenient to have to restart the hosting POD just to force the LSP server to restart.

Is there a way in JupyterLab to force the restart of an LSP server. Is there anything in the UI or on command line that would trigger JupyterLab to start a new LSP instance if it dies.

@JulianSMoore
Copy link

Although I would like a better solution, I have found that F5 refresh of the Jupyter tab causes the Python LSP to start working again (Win 10; Google Chrome)

@cccs-jc
Copy link
Contributor Author

cccs-jc commented Dec 31, 2021

thanks @JulianSMoore I've notice that as well. Since I switch to using a python launch script pressing F5 restarts the LSP server which is better than nothing.

Not sure it did that when I was using a declarative registration of the LSP spec. But it definitely does when using python launch script https://github.com/CybercentreCanada/jupyterlab-sql-editor/blob/main/ipython_magic/sparksql/main.py

@krassowski krassowski mentioned this issue Jan 1, 2022
13 tasks
@krassowski
Copy link
Member

I added this to the 4.0 release plan. If someone wants to work on this, I would propose to add this:

  • in the status popover, and/or
  • as a command in the command palette ("restart all servers connected to this document").

We already have code for restarting connection:

protected reload_connection() {

which is triggered when changing kernels. Restarting connection does not guarantee restarting the LSP server though. We would probably need to add a way to command jupyter-lsp to restart the LSP servers.

@bollwyvl
Copy link
Collaborator

bollwyvl commented Jan 1, 2022 via email

@krassowski krassowski mentioned this issue Mar 14, 2023
2 tasks
@krassowski krassowski mentioned this issue Sep 16, 2023
8 tasks
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

4 participants