-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
feat(lsp): jupyter notebook analysis #20719
Conversation
This doesn't close #20662, as that's for supporting the extended Jupyter protocol completions (separate from LSP) when attached to a Jupyter Frontend (Jupyterlab, jupyter console). Awesome to see for us VS Code users though! Thank you. |
Interesting update! It seems the regular node/ts server does the same thing, for each cell that contains With that in mind I think this is ready to land as an MVP. |
Done now: 3d5e434. This normalizes all module specifiers that come out of tsc, and denormalizes notebook cell specifiers that go into tsc (by converting them to file URLs and forcing a file extension). This basically has parity with modules now. All quick-fixes, local and remote import completion, auto-imports etc. work as far as I can see. It's in a pretty complete state apart from:
which is the same case with the node/tsc server. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
All of our analysis and editor features will work in vscode notebook cells with this.
About 5/6 of this PR is making sure we re-normalize module specifiers that come out of tsc, since notebook cell URIs have to be transformed on the way in.
Coupled with denoland/vscode_deno#949.
Fixes #20657.
Fixes .. #20662.Todo (not in this PR):
Ref: Jupyter kernel on vscode gives error about variables declared on above cells vscode_deno#932.