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

Diagnostics for notebook #2040

Closed
mtshiba opened this issue Oct 13, 2024 · 3 comments
Closed

Diagnostics for notebook #2040

mtshiba opened this issue Oct 13, 2024 · 3 comments
Labels
info-needed Issue requires more information from poster

Comments

@mtshiba
Copy link

mtshiba commented Oct 13, 2024

I am developing a language server for Python (pylyzer).
Since LSP v3.17 now supports notebook documents, I would like to implement Jupyter Notebook support for pylyzer.

As a result of my trials, I was able to get a notebookDocument/didOpen notification from the client (VSCode), but even if I send diagnostics, the error location does not seem to be highlighted. How can I specify the range of diagnostics on the notebook?
Or is this impossible to achieve with the current LSP? If so, are there plans to define specs for this and support it?
(Also, it seems that language service requests are not currently sent for notebooks, are there also plans to define specs and support them?)

@dbaeumer
Copy link
Member

Actually that should work. Do you use push or pull diagnostics. If you use push, you need to push them on the notebook cell document not the notebook itself.

@dbaeumer dbaeumer added the info-needed Issue requires more information from poster label Oct 14, 2024
@mtshiba
Copy link
Author

mtshiba commented Oct 18, 2024

I found the cause. It seems that the URIs of notebook cells have fragments. I was normalizing the URIs by lowercasing them on systems with case-insensitive file systems, but I shouldn't do this with URIs that have fragments.

Diagnostics now display correctly. Thanks.

@dbaeumer
Copy link
Member

@mtshiba great to hear you got it working. Will close the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants