-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Syntax highlighting keeps breaking #190981
Comments
Can you clarify what you mean with syntax highlighting breaking? |
Please see the screenshot. At the top the variable name is just in grey. I believe this issue is also present in the stack overflow page i linked |
Can you inspect editor tokens in in the broken editor (search in command palette) and share a screenshot? |
i am not sure how to do this? Please may you advise? I am trying to search "Editor tokens" in the command pallet? Sorry i am not familiar with this |
I restarted my VS code and then got this to appear. However i had to restart VSC and reopen the Python notebook completely |
Did you use the Inspect command? |
yes i did from my understanding |
I don't think that this is a tokenization problem, maybe the extension resources cannot be loaded or something (in notebook land?) else is off. |
I have looked at my extensions and uninstalled all the ones i dont use and have the same extensions installed as a friends (whose VSC works perfect) I have uninstalled VSC many times and uninstalled python, formatted my PC - all the basic debugging I could do I did already. |
@JustinSmith66 do you happen to have Pylance extension installed? |
Yes i do have that installed. The list of extensions i have is listed in the original question's post |
@JustinSmith66 I'm wondering if you can reproduce this issue if you have Pylance disabled. Currently there is an issue with Pylance microsoft/pylance-release#4742 which might contribute to this. |
but pylance is purely for syntax highlighting so would disabling it not just ruin the whole syntax highlighting feature ?I presume rolling back a few pylance versions is the only solution. But at the moment that seems to be the solution other people are using (microsoft/pylance-release#4742 (comment)) |
@JustinSmith66 VS Code offers basic syntax highlighting for Python code and Pylance offers richer ones, I'm trying to figure out if it's an extension issue or it's a VS Code core issue. From what I read it's the same as microsoft/pylance-release#4742, let's track it there. |
Type: Bug
my syntax highlighting for my python code randomly breaks (see the first variable is just "grey" in the first screenshot)
it is seriously annoying. I have looked on many online sources (https://stackoverflow.com/questions/59775038/visual-studio-code-syntax-highlighting-not-working#:~:text=In%20my%20case%20I%20needed,as%20source%20for%20the%20problem.) and this keeps happening.
VS Code version: Code 1.81.1 (6c3e3db, 2023-08-09T22:22:42.175Z)
OS version: Windows_NT x64 10.0.22621
Modes:
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Extensions (9)
A/B Experiments
The text was updated successfully, but these errors were encountered: