code-server
code-server copied to clipboard
[Bug]: Hover feature does not work in Jupyter notebooks
Is there an existing issue for this?
- [X] I have searched the existing issues
OS/Web Information
- Web Browser:
- Local OS:
- Remote OS:
- Remote Architecture:
code-server --version:
Steps to Reproduce
- open code-server
- create a new jupyter notebook
- install python and jupyter extensions
Expected
- Given a jupyter notebook
- When writing e.g.
import numpyandnp.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?
- [X] I cannot reproduce this in VS Code.
- [X] I cannot reproduce this in GitHub Codespaces.
Are you accessing code-server over HTTPS?
- [X] 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 definitionalso do not work in a jupyter notebook in code-server?
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.
Most probably due to Pylance only being published to the VS Code marketplace.
ℹ️ Pylance only runs with the official VS Code build.
Cross reference: https://github.com/microsoft/pylance-release/issues/746
Cross reference: https://github.com/coder/code-server/issues/1938
@cgebbe The situation regarding Pylance is not going to change.
Please close this issue.
As @benz0li mentioned, Pylance is only published to the VS Code marketplace; however, Jedi can be used instead of Pylance.
https://github.com/coder/code-server/assets/69881238/3dd1e13d-cad1-4d47-9bee-9a6a98379a28
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: https://github.com/microsoft/vscode-jupyter/issues/12494
@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?
Closing since it looks like there is nothing we can do, but feel free to continue the discussion.