Variable type on hover not showing up with JediLSP
See original GitHub issueEnvironment data
- Version: 1.56.0
- Date: 2021-05-04T22:06:21.189Z (2 days ago)
- Electron: 12.0.4
- Chrome: 89.0.4389.114
- Node.js: 14.16.0
- OS: Darwin x64 20.4.0
- Type of virtual environment used: venv
- Relevant/affected Python packages and their versions: mypy
- Relevant/affected Python-related VS Code extensions and their versions: MS-Python, GitLens
- Value of the
python.languageServersetting: jedi (default)
Expected behaviour
Variable type pops up in a small box on hover.
Actual behaviour
Only function definitions pop up on hover, variables do not pop up except with CMD + hover (in which case the full variable definition is shown).
Steps to reproduce:
- Install VSCode on MacOS
- Install MS-Python and GitLens extensions
- Set mypy as the linter (although I disabled it and it’s the same)
I’ve actually been having this problem on VSCode Insiders for a few weeks now. I kept updating it in hope of being resolved, and finally I uninstalled it and installed the fresh mainstream version, but nothing changed.
Never had this problem on Windows (same extensions).
Sometimes switching between the language servers would make it work but then immediately break on jedi. Pylance works fine in this aspect, but I don’t want to use pylance because it gives too many false warnings.
I have a feeling something is wrong with jedi because sometimes it would also give errors on python builtins (logging, datetime and what not).
Logs
I don’t know where the extensions and language servers log output.
Issue Analytics
- State:
- Created 2 years ago
- Comments:9

Top Related StackOverflow Question
I take this back, it wasn’t a problem of pylance because it simply had no way to determine where the modules are called from. So I got rid of any false warnings by setting
Python › Analysis: Extra Pathsproperly (usually you want that to be the root package).Actually I’m already loving Pylance as its type assistance is better, the only downside is that it colorizes everything in green on the Monokai theme… But I’m already taking this issue offtopic 😃
Thank you for sharing that you managed to find a a workaround using Pylance for now 🙂 Even though it is the default language server, you can override this by selecting the language server of your choice. The
Jedilanguage server option will be replaced byJediLSPin the future, so we still need to investigate this issue, and see whether it is caused upstream, or if it’s a problem in the extension.