microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.59k stars 29.03k forks source link

VS Code loses automatic syntax highlighting #133507

Closed oliverdrummond closed 3 years ago

oliverdrummond commented 3 years ago

Issue Type: Bug

1- Copy python code into empty VS Code tab; 2- Wait for VS Code to add the automatic syntax highlighting; 3- Hover the mouse over a variable; 4- Press Ctrl key (I was trying to "Go to definition)

VS Code will lose the previously language displayed in "Select Language Mode" (It will change from Python to Plain Text)

VS Code version: Code 1.60.1 (83bd43bc519d15e50c4272c6cf5c1479df196a4d, 2021-09-10T17:07:10.714Z) OS version: Windows_NT x64 10.0.19043 Restricted Mode: No

TylerLeonhardt commented 3 years ago

@oliverdrummond thanks for opening this, I'm having a hard time reproing. maybe send a gif of what you're seeing?

TylerLeonhardt commented 3 years ago

/gifPlease

oliverdrummond commented 3 years ago

Sure! Here it goes. Please let me know if you need more details for this :)

Bug

oliverdrummond commented 3 years ago

Is this enough information?

Thanks

TylerLeonhardt commented 3 years ago

This is bizarre. I can't reproduce it, I'm afraid. What extensions do you have installed? Do you have any keybindings defined? Does this reproduce with a python file on your filesytem?

oliverdrummond commented 3 years ago

It is quite weird indeed :(

Here is the list of installed extensions

code --install-extension Angular.ng-template
code --install-extension CoenraadS.bracket-pair-colorizer-2
code --install-extension DavidAnson.vscode-markdownlint    
code --install-extension dbaeumer.vscode-eslint
code --install-extension eamodio.gitlens
code --install-extension ecmel.vscode-html-css
code --install-extension esbenp.prettier-vscode
code --install-extension fabiospampinato.vscode-todo-plus
code --install-extension fredu.color-conversion
code --install-extension GitHub.copilot
code --install-extension HookyQR.beautify
code --install-extension igress.python-coding-conventions
code --install-extension infinity1207.angular2-switcher
code --install-extension johnpapa.Angular2
code --install-extension mlewand.select-part-of-word
code --install-extension ms-pyright.pyright
code --install-extension ms-python.python
code --install-extension ms-python.vscode-pylance
code --install-extension philsinatra.nested-comments
code --install-extension SantaCodes.santacodes-region-viewer
code --install-extension SirTori.indenticator
code --install-extension streetsidesoftware.code-spell-checker
code --install-extension VisualStudioExptTeam.vscodeintellicode
code --install-extension vscode-icons-team.vscode-icons
code --install-extension wmaurer.change-case
code --install-extension wwm.better-align
code --install-extension yzhang.markdown-all-in-one
code --install-extension Zignd.html-css-class-completion

Here are my keyboard shortcuts image

And no, this does not reproduce on python files on my filesystem. Actually, if I set the language as "Python" manually (without the newly added automatic syntax highlighting), this bug does not happen.

Crazy, right?

TylerLeonhardt commented 3 years ago

I'm trying to narrow down where the problem might be... two recommendations: