简体   繁体   中英

Visual Studio Code - Missing most syntax highlighting for JavaScript

When editing JavaScript files in Visual Studio Code on my Mac I'm only seeing very basic syntax highlighting. The same also applies for TypeScript files.

I'm certain there used to be more syntax highlighting when editing JavaScript and TypeScript files.

I already tried to disable all extensions but it didn't help.

Visual Studio Code version: 1.25.1

How can I re-enable proper syntax highlighting in Visual Studio Code?

Uninstall Visual Studio Code using the description here: How to completely uninstall vscode on mac

After a reinstall of Visual Studio Code syntax highlighting works fine again.

Please try to switch color theme back and forth ( Ctrl/CMD + Shift + P and type theme and then select random one. Repet procedure to revert to one you choose).

For me it solves issues with syntax highlighting in version 1.38.1

I had some problems with my js/ts codes syntax highlighting.

(In the basic theme, 'functions' don't turn yellow, 'booleans' don't turn dark blue, 'types' don't turn green. However, when I hovered them, they showed the right colors)

I looked for the answer everywhere but not solved. Today I accidentally uninstalled the extension "Syntax Highlighter", and it just solved.

enter image description here

I believe this is not the problem of the extension, but it may somehow cover the config of original js/ts.

Hope this can help someone who has the same problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM