-
Notifications
You must be signed in to change notification settings - Fork 194
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
Adding support NotebookDocumentClientCapabilities #308
Comments
Hey @MrBago, thanks for your interest in adding this feature! I think @krassowski is the right person to provide guidance here because he has worked a lot on integrating LSP features in notebooks. |
@ccordoba12 Thanks for the response. I've reached out to @krassowski as well. The main guidance I need is around understanding how text syncing currently works. The NotebookDocumentClientCapability is structured on top of the text syncing capability where a notebook is a collection of text documents. To support the notebook we'd need to be able to have multiple text documents represent a single "unit" for static or error analysis. Does the language server keep an internal copy of documents when handing text sync messages? Is the text sync capability written as a plugin? |
It did indeed...
🎉. Happy to help.
I would naively say that this should should be rather straightforward.
Yes.
No. python-lsp-server/pylsp/python_lsp.py Lines 411 to 419 in 2e98dfa
python-lsp-server/pylsp/workspace.py Lines 116 to 118 in 2e98dfa
Briefly,
I think that we should rewrite such plugins and remove the document path from public API (maybe it is too drastic, but hiding behind underscore may make plugin developers think twice before they use it). |
This particulate example doesn't rely on file being on disk though. It gets data from stdin. The path is passed because some linter rules might need the file path to be able to work. |
Are there any updates on this issue? |
No, there aren't, sorry. |
Hey folks - picking this up from @MrBago. I got capacity to work on this the next two weeks. 🎉 Will add a comment later about my thoughts on this! |
@krassowski I looked into the LSP specs regarding the NotebookDocument support and I am not 100% sure how things fit together. Do you have a clear idea how to implement notebook support from reading the specs? Do you have time for a call to discuss this? Others are also happily invited! To give you context, I have the following open questions:
|
FYI: I have a draft PR open, see #389 |
The LSP 3.17 specification added support for notebook documents via NotebookDocumentClientCapabilities. I'd love to have support for this capability in python-lsp-server and to be able to use the language server with Jupyter or other notebooks.
I'd like to understand what would be need and how much effort it would be to add support for notebook documents.
If there is interest in including this improvement and someone could help provide guidance on the work, I may have capacity to work on this and submit a patch.
The text was updated successfully, but these errors were encountered: