Skip to content

[Bug]: Hover feature does not work in Jupyter notebooks #6323

Closed as not planned

Description

@cgebbe

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser:
  • Local OS:
  • Remote OS:
  • Remote Architecture:
  • code-server --version:

Steps to Reproduce

  1. open code-server
  2. create a new jupyter notebook
  3. install python and jupyter extensions

Expected

  • Given a jupyter notebook
  • When writing e.g. import numpy and np.ones(
  • Then a nice hover window pops up

Actual

  • No hover window pops up

Logs

No response

Screenshot/Video

No response

Does this issue happen in VS Code or GitHub Codespaces?

  • I cannot reproduce this in VS Code.
  • I cannot reproduce this in GitHub Codespaces.

Are you accessing code-server over HTTPS?

  • I am using HTTPS.

Notes

  • This works in VS Code
  • This works in Github Codespaces (even with JEDI language server)
  • Given a plain python file in code-server, the same steps DO lead to a hover window.
  • //EDIT: Also just realized that functions such as peek definition also do not work in a jupyter notebook in code-server?

Activity

  1. added
    bugSomething isn't working
    triageThis issue needs to be triaged by a maintainer
    on Jul 12, 2023
  2. benz0li commented on Jul 12, 2023

    @benz0li
    Contributor

    I can confirm that this works with the current versions of

    • VS Code/Codespaces: 1.80.0
    • Python extension: 2023.12.0
    • Jupyter extension: 2023.6.1101941928

    Please be aware that code-sever (current version: 4.14.1, aka Code 1.79.2) relies on the Open VSX Registry, which currently provides

    • Python extension: 2023.10.1
    • Jupyter extension: 2023.3.100

    for code-server v4.14.1.


    Let us re-evaluate after @code-asher has updated code-server so it is based on Code 1.80.

  3. benz0li commented on Jul 12, 2023

    @benz0li
    Contributor

    Most probably due to Pylance only being published to the VS Code marketplace.
    ℹ️ Pylance only runs with the official VS Code build.

    Cross reference: microsoft/pylance-release#746

  4. benz0li commented on Jul 12, 2023

    @benz0li
    Contributor

    Cross reference: #1938

  5. benz0li commented on Aug 9, 2023

    @benz0li
    Contributor

    @cgebbe The situation regarding Pylance is not going to change.

    Please close this issue.

  6. skevetter commented on Nov 11, 2023

    @skevetter

    As @benz0li mentioned, Pylance is only published to the VS Code marketplace; however, Jedi can be used instead of Pylance.

    jupyter-notebook-lsp.mp4

    Configure settings.json

    {
        "python.languageServer": "Jedi",
    }
    Code-Server

    code-server: v4.18.0
    Code: 1.83.1
    Commit: d7a2b4936af1bfd80cb96f2567af68badc2325e3
    Date: 2023-10-19T00:53:43.414Z
    Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
    

    Extensions

    Name: Python
    Id: ms-python.python
    Description: IntelliSense (Pylance), Linting, Debugging (multi-threaded, remote), code formatting, refactoring, unit tests, and more.
    Version: 2023.21.13141007
    Publisher: ms-python
    VS Marketplace Link: https://open-vsx.org/vscode/item?itemName=ms-python.python
    
    Name: Jupyter
    Id: ms-toolsai.jupyter
    Description: Jupyter notebook support, interactive programming and computing that supports Intellisense, debugging and more.
    Version: 2023.9.100
    Publisher: ms-toolsai
    VS Marketplace Link: https://open-vsx.org/vscode/item?itemName=ms-toolsai.jupyter
    

    Related: microsoft/vscode-jupyter#12494

  7. rohit901 commented on Jan 4, 2024

    @rohit901

    @OceanTrader1 thanks for this, I wanted to ask what is the difference between using Pylance vs Jedi? is there any tradeoff for making this change?

    EDIT: Also, Im able to get hover/definition feature working in notebooks but when I click on some library functions/classes it is not working and I'm not able to go to the definition, how can I fix it?

  8. code-asher commented on Apr 9, 2024

    @code-asher
    Member

    Closing since it looks like there is nothing we can do, but feel free to continue the discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageThis issue needs to be triaged by a maintainer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions