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 pulling doesn't work for notebook cells #1464

Closed
rchiodo opened this issue Apr 19, 2024 · 4 comments · Fixed by #1465
Closed

Diagnostics pulling doesn't work for notebook cells #1464

rchiodo opened this issue Apr 19, 2024 · 4 comments · Fixed by #1465
Labels
feature-request Request for new features or functionality
Milestone

Comments

@rchiodo
Copy link
Contributor

rchiodo commented Apr 19, 2024

I'm attempting to switch Pylance to use a pull method for diagnostics but I'm not getting textDocument/diagnostic messages for notebook cells.

I believe that's because notebook changes aren't tracked here:

if (diagnosticPullOptions.onChange === true) {

And notebook opens aren't tracked here:

const openFeature = client.getFeature(DidOpenTextDocumentNotification.method);

@dbaeumer
Copy link
Member

Diagnostic pull is not available for notebook cells. It would require a special implementation in the notebook.ts file. It should work for the underlying document of the cell but that is not what you are asking for.

@rchiodo
Copy link
Contributor Author

rchiodo commented Apr 22, 2024

It should work for the underlying document of the cell but that is not what you are asking for.

Sorry, I'm not sure what you mean. Are you saying there's an alternative method to get the requests? Or are you saying something still needs to be implemented?

@rchiodo
Copy link
Contributor Author

rchiodo commented Apr 22, 2024

I'm working on the changes to notebook.ts to add support for this. Doesn't seem too hard. Diagnostics.ts just needs to know the same events that are sent for regular documents.

@rchiodo
Copy link
Contributor Author

rchiodo commented Apr 22, 2024

Please take a look at my PR. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants