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

Jedi: Execute command 'vscode.executeHoverProvider' doesn't return #15666

Closed
TAUnionOtto opened this issue Mar 15, 2021 · 8 comments
Closed

Jedi: Execute command 'vscode.executeHoverProvider' doesn't return #15666

TAUnionOtto opened this issue Mar 15, 2021 · 8 comments
Assignees
Labels
area-editor-* User-facing catch-all bug Issue identified by VS Code Team member as probable bug

Comments

@TAUnionOtto
Copy link

Environment data

  • VS Code version: 1.54.1
  • Extension version (available under the Extensions sidebar): 2021.2.636928669
  • OS and version: Windows 10 1909
  • Python version (& distribution if applicable, e.g. Anaconda): 3.9.2 (in Windows)
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
  • Relevant/affected Python packages and their versions: N/A
  • Relevant/affected Python-related VS Code extensions and their versions: N/A
  • Value of the python.languageServer setting: N/A

Expected behaviour

Show document when hovering like in normal python file.

Actual behaviour

Keeps show loading.

Steps to reproduce:

  1. Register TextDocumentContentProvider for saving and providing virtual document for python code block in markdown file.
  2. Register CompletionItemProvider to get virtual document and execute command 'vscode.executeCompletionItemProvider' for provide IntelliSense of python. (And it works good.)
  3. Register HoverProvider to get virtual document (same way and code as CompletionItemProvider) and execute command 'vscode.executeHoverProvider' for provide language hovering of python.
  4. It keeps showing loading when hover any text.

vsce_python_demo

Demo:

Code is here

  • Clone and run yarn && yarn watch, then press F5 to run extension.
  • Create a markdown file and copy paragraph block example from README.md (same as above gif).
  • Type in code block.

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

> ~\AppData\Local\Programs\Python\Python39\python.exe c:\Users\EDZ\.vscode\extensions\ms-toolsai.jupyter-2021.3.619093157\pythonFiles\pyvsc-run-isolated.py pip list
> ~\AppData\Local\Programs\Python\Python39\python.exe c:\Users\EDZ\.vscode\extensions\ms-toolsai.jupyter-2021.3.619093157\pythonFiles\pyvsc-run-isolated.py pip list
> ~\.msvscode.hdinsight\hdinsightJupyter\Scripts\python.exe c:\Users\EDZ\.vscode\extensions\ms-toolsai.jupyter-2021.3.619093157\pythonFiles\pyvsc-run-isolated.py -c "import jupyter"
> ~\.msvscode.hdinsight\hdinsightJupyter\Scripts\python.exe c:\Users\EDZ\.vscode\extensions\ms-toolsai.jupyter-2021.3.619093157\pythonFiles\pyvsc-run-isolated.py -c "import notebook"
> ~\.msvscode.hdinsight\hdinsightJupyter\Scripts\python.exe c:\Users\EDZ\.vscode\extensions\ms-toolsai.jupyter-2021.3.619093157\pythonFiles\pyvsc-run-isolated.py jupyter kernelspec --version

@TAUnionOtto TAUnionOtto added triage-needed Needs assignment to the proper sub-team bug Issue identified by VS Code Team member as probable bug labels Mar 15, 2021
@TAUnionOtto
Copy link
Author

Copy from microsoft/vscode#118944

@karthiknadig karthiknadig self-assigned this Mar 15, 2021
@karthiknadig karthiknadig added area-editor-* User-facing catch-all triage labels Mar 15, 2021
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Mar 15, 2021
@karthiknadig
Copy link
Member

@TAUnionOtto What is the language server that is selected? We do slightly different things depending on Jedi and Other language server.

@TAUnionOtto
Copy link
Author

@TAUnionOtto What is the language server that is selected? We do slightly different things depending on Jedi and Other language server.

Jedi is selected (as default), I haven't changed this setting anywhere.

@karthiknadig
Copy link
Member

@TAUnionOtto Do you get the same behavior if you select any other language server?

@TAUnionOtto
Copy link
Author

TAUnionOtto commented Mar 16, 2021

@TAUnionOtto Do you get the same behavior if you select any other language server?

  • Jedi

    • IntelliSense: Work
    • Hover: Not work, keeps show loading
  • JediLSP

    • IntelliSense: Work
    • Hover: Work, but it looks like the formatting is lost

    vsce_python_demo_JediLSP

  • Microsoft

    • IntelliSense: Not work well
    • Hover: Work sometime

    vsce_python_demo_Microsoft

  • None
    Of course not work

  • Pylance

    • IntelliSense: Work
    • Hover: Work, but different from Jedi

    vsce_python_demo_Pylance

@karthiknadig
Copy link
Member

@TAUnionOtto Jedi will be deprecated and replaced by JediLSP soon. The Markdown formatting with JediLSP is addressed in the latest version of the jedi-language-server, but to avoid shipping multiple versions of Jedi we are using a older version of jedi. This should look better when we switch over to JediLSP.

Microsoft (Microsoft Language Server) will be deprecated and replaced by Pylance.

We have moved the efforts for Jedi and Microsoft over to JediLSP and Pylance, so we recommend using those.

@TAUnionOtto
Copy link
Author

@karthiknadig Thanks for helping, I will try to use JediLSP as language server.

Looking forward to your good news for switching over to JediLSP.

@karthiknadig karthiknadig changed the title Execute command 'vscode.executeHoverProvider' then keeps showing loading with python extension Jedi: Execute command 'vscode.executeHoverProvider' doesn't return Mar 16, 2021
@karthiknadig
Copy link
Member

Closing this issue, since it works with JediLSP or Pylance.

@ghost ghost removed the triage label Mar 16, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-editor-* User-facing catch-all bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants