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

Pyscript autocomplete doesn't work in VSCode #24

Open
tms320 opened this issue Dec 10, 2022 · 3 comments
Open

Pyscript autocomplete doesn't work in VSCode #24

tms320 opened this issue Dec 10, 2022 · 3 comments

Comments

@tms320
Copy link

tms320 commented Dec 10, 2022

I have installed Pyscript integration to Home Assistant (it runs on Ubuntu machine).
Then I installed HASS Pyscript kernel shim for Jupyter on my Windows machine (where VSCode installed).
If I open the browser-based Jupyter client (using 'jupyter notebook' command) and create new notebook, the autocomplete of HASS objects works fine (using Tab key). For example:
image
image
But in VSCode autocomplete for HASS objects doesn't work (I press Ctrl+Space key combination):
image
image
What am I doing wrong?

@Gavin-Whitesitt
Copy link

Same issue here. No autocomplete within vscode. Anyone ever resolve this?

@Devenda
Copy link

Devenda commented Sep 25, 2023

Same here.

Anybody know how iPython/Juypiter receives all possible autocomplete values?

@mikejhill
Copy link

I just spent some time on this, but gave up for now. There are two existing settings in VSCode which sound relevant:

  • jupyter.enableKernelCompletions: Enable code completions in Notebooks and Interactive Windows using results from the associated Jupyter Kernel.
  • jupyter.enableExtendedPythonKernelCompletions: Enables Jedi support for extended IntelliSense completions in running Python Jupyter kernels for Python (see this setting). This can greatly impact notebook cell execution performance. Use with caution.

The former seems to fit the ticket, but seems that turning it on causes VSCode uses an IPython magic command which Pyscript doesn't support:

Exception in <jupyter_60> line 54:
        %config Completer.use_jedi = False
        ^
    SyntaxError: invalid syntax (jupyter_60, line 54)

I tried a quick hack to skip this, but VSCode immediately starts hitting other strange issues:

NameError: name '__VSCODE_send_chat_message__' is not defined

I'm new to both Python and Jupyter, so not going to explore deeper right now. Jupyter Notebook/Lab seem to work great, but would be nice if someone could figure out VSCode too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants