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

Code tooltip has no syntax highlighting #16025

Closed
OutOfFocus4 opened this issue Apr 23, 2021 · 4 comments
Closed

Code tooltip has no syntax highlighting #16025

OutOfFocus4 opened this issue Apr 23, 2021 · 4 comments
Assignees
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster verified Verification succeeded

Comments

@OutOfFocus4
Copy link

Environment data

  • VS Code version: 1.55.2
  • Extension version (available under the Extensions sidebar): 2021.4.765268190
  • OS and version: Darwin x64 20.3.0
  • Python version (& distribution if applicable, e.g. Anaconda): CPython 3.9.4, 3.7.9
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
  • Relevant/affected Python packages and their versions: None
  • Relevant/affected Python-related VS Code extensions and their versions: Python
  • Value of the python.languageServer setting: "Jedi"

Expected behaviour

When hovering over code and a tooltip appears, the code in that tooltip will have syntax highlighting.

Example on Windows:

Jedi on Windows

Actual behaviour

Tooltip has no syntax coloring.
Jedi on MacOS

Steps to reproduce:

  1. On a Mac, create a file called temp.py with the following content:
print(isinstance)
  1. Hover over isinstance
  2. The tooltip will only use monochromatic text.
@OutOfFocus4 OutOfFocus4 added triage-needed Needs assignment to the proper sub-team bug Issue identified by VS Code Team member as probable bug labels Apr 23, 2021
@karthiknadig
Copy link
Member

@OutOfFocus4 This is likely because of language server used in each of these scenarios. Try JediLSP or Pylance as the language server options and see if they help with this.

@OutOfFocus4
Copy link
Author

@karthiknadig Both are using the default language server (Jedi), but only one of them uses syntax highlighting in the tooltips. I fail to see how using a different language server fixes the issue of this language server giving different results depending on the platform.

Off-topic, but if I switch to JediLSP, the text isn't formatted correctly, which is why I prefer Jedi:

JediLSP on Windows

@karthiknadig karthiknadig added area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. triage and removed triage-needed Needs assignment to the proper sub-team labels Apr 26, 2021
@karthiknadig
Copy link
Member

@OutOfFocus4 Jedi setting we have is outdated (i.e, it uses a old version of jedi to support 2.7). Any fix for that should come from jedi itself (https://github.com/davidhalter/jedi). Given we use an old version, it will likely not be addressed there. The jedilsp setting uses the latest jedi, I have already filed this bug on them pappasam/jedi-language-server#98

I recommend trying pylance, to see if that behaves better. If you run into issues with pylance please file a bug on https://github.com/microsoft/pylance-release

@kimadeline kimadeline added the info-needed Issue requires more information from poster label Sep 2, 2021
@kimadeline
Copy link

Doesn't happen with Jedi behind LSP (introduced in #11995) in 2021.10.1255420962-dev, will be out in 2021.10 stable:

image

@kimadeline kimadeline added the verified Verification succeeded label Sep 21, 2021
@kimadeline kimadeline added this to the September 2021 milestone Sep 21, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants