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

Make .virtual_documents optional #930

Merged

Conversation

krassowski
Copy link
Member

@krassowski krassowski commented Apr 16, 2023

References

Closes #537. Related to #924.

Code changes

  • adds new requires_documents_on_disk field in the specs (True by default for now, will become False in next major version)
  • publicly exposes language_servers: KeyedLanguageServerSpecs API member of the manager
  • updates types to for listeners to give access for full exposed manager API for manager argument
  • marks following servers as not requiring documents on disk: Pyright

User-facing changes

No .virtual_documents when only using servers which do not require it. If at least one of installed servers requires .virtual_documents, it may still be created, but the creation will be delayed until such a server is actually in use.

Backwards-incompatible changes

None

@github-actions
Copy link

Binder 👈 Launch a binder notebook on branch krassowski/jupyterlab-lsp/optional-virtual-documents-on-disk

because deployments may primarily use a well-behaved
server that does not need virtual documents folder
together with secondary servers that do require it
but are only used from time to time when opening
specific file types.

This can also marginally improve startup times as there is no
need to wait on file system operation of purging the directory
which is now only done on first relevant LSP message.
@krassowski krassowski merged commit a49b5bc into jupyter-lsp:master Apr 23, 2023
krassowski added a commit to krassowski/jupyterlab that referenced this pull request Jun 18, 2023
fcollonval pushed a commit to jupyterlab/jupyterlab that referenced this pull request Jun 22, 2023
* Use proper web socket URL, see jupyter-lsp/jupyterlab-lsp#819

Co-authored-by: Author: MikeSem <[email protected]>

* Use app's HTTP settings, cherry-picked from jupyter-lsp/jupyterlab-lsp#882

Co-authored-by: Nicholas Bollweg <[email protected]>

* Support optional `.virtual_documents`

Cherry-picked from jupyter-lsp/jupyterlab-lsp#930

---------

Co-authored-by: Author: MikeSem <[email protected]>
Co-authored-by: Nicholas Bollweg <[email protected]>
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

Successfully merging this pull request may close these issues.

Allow to disable storing virtual documents on the file system in schema
1 participant