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

Autocompletion doesn't work in VSCode jupyter notebooks + deno kernel #20657

Closed
btwiuse opened this issue Sep 24, 2023 · 7 comments · Fixed by #20719
Closed

Autocompletion doesn't work in VSCode jupyter notebooks + deno kernel #20657

btwiuse opened this issue Sep 24, 2023 · 7 comments · Fixed by #20719
Assignees
Labels
bug Something isn't working correctly deno jupyter Related to "deno jupyter" subcommand lsp related to the language server

Comments

@btwiuse
Copy link

btwiuse commented Sep 24, 2023

To reproduce:

  • Create a new Jupyter Notebook in VS Code.
  • Set the kernel to Deno.
  • Enter a cell: let x = 42
  • Execute the cell
  • Enter another cell: x.

Autocompletion doesn't show up when I press tabs. It currently works only in jupyterlab.

Is there any way to get it working in VSCode?

@btwiuse
Copy link
Author

btwiuse commented Sep 24, 2023

Update: I discovered by accident that if you change the language from "typescript" to "python", autocompletion works immediately when . is pressed

image

@bartlomieju
Copy link
Member

Thanks for reporting, that's quite strange! I'll take a look at the extension and see if that's the problem with how it treats TS cells or problem on the Deno side.

@bartlomieju bartlomieju added bug Something isn't working correctly deno jupyter Related to "deno jupyter" subcommand labels Sep 24, 2023
@bartlomieju bartlomieju self-assigned this Sep 24, 2023
@bartlomieju
Copy link
Member

CC @rgbkrk

@DonJayamanne
Copy link
Contributor

Hi, I’m one of the engineers working on vscode and support for Jupyter notebooks in vscode
I’ll take a look and see what’s going on at our end

@nayeemrmn nayeemrmn added the lsp related to the language server label Sep 29, 2023
@DonJayamanne
Copy link
Contributor

@rgbkrk @bartlomieju
Perhaps you can help me, I didn't want to create a new issue and sorry for highjacking this issue.
I've installed the latest versin of deno 1.37
regular stuff works, but not wirdgets.
I'm assuming thats because widgets are still a WIP
Or do I need to do something different

This is the error message I'm getting

Stack trace:
Error: Deno.jupyter is only available in `deno jupyter` subcommand.
    at Object.get (ext:cli/runtime/js/99_main.js:550:15)
    at hasJupyterBroadcast (https://deno.land/x/display@v1.1.1/mod.ts:69:5)
    at display (https://deno.land/x/display@v1.1.1/mod.ts:189:8)
    at <anonymous>:3:7

@rgbkrk
Copy link
Contributor

rgbkrk commented Oct 8, 2023

The last patch release was missing this hardening of the jupyter namespace: #20710

If you want to try out widgets (really only anywidget), you'll need to build from source or install the canary:

deno upgrade --canary

You can also target a specific commit like:

deno upgrade --canary --version=6cb5d8eb86fe205ad4f4411e20c206246ff25682

One other note on widget support -- there is only sending, no receiving.

@karelklima
Copy link

Autocompletion does not work for me on Windows if Deno and Python are installed via scoop. I uninstalled everything and installed Deno using the recommended PowerShell command and Python using Windows installer, which fixed the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly deno jupyter Related to "deno jupyter" subcommand lsp related to the language server
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants