-
Notifications
You must be signed in to change notification settings - Fork 107
Notebook Document support is not implemented correctly #1066
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
Comments
This comment was marked as outdated.
This comment was marked as outdated.
Sorry I misread the LSP spec, the payload is right.
|
The implementation is not aligned on the LSP 3.17 specification. csharp-language-server-protocol/src/Protocol/Features/Document/NotebookDocumentSyncFeature.cs Lines 757 to 765 in 86dc4ac
NotebookSelector should be handled as an array/container.
|
For information, |
LSP documentation fix: microsoft/language-server-protocol#1831 |
Hello,
I was trying to connect from the LanguageClient to the pylsp server and when I did this with the current version of pylsp that supports LSP v. 3.17, the
Initialize
call ends in following Exception related to JSON Deserialization:Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'OmniSharp.Extensions.LanguageServer.Protocol.Models.NotebookSelector' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly
I did some digging and the culprit seems to be this part of the pylsp response that specifies server capabilities:
'notebookDocumentSync': {'notebookSelector': [{'cells': [{'language': 'python'}]}]}
As you can see, the top-level object of notebookSelector is array, which is (if I understand the LSP documentation correctly) a valid syntax, but the LanguageClient does not seem to support it.
The text was updated successfully, but these errors were encountered: