Syntax Highlighting is not working or our syntax highlighter broke, it’s one of the recent issues in vs code. Follow this article and solve your syntax highlighter not working issue.

Step 0: Make sure the issue is still reproducible since most of the time visual studio code update itself and it solves the problem.

Step 1: Update your extension. Old versions of extensions might interfere with other extensions, Update your extension and check whether syntax highlighting is working or not.

Method 1: Downgrade JavaScript and TypeScript Nightly Extension

  1. Check whether do you have installed “JavaScript and TypeScript Nightly Extension” installed or not
  2. If installed, downgrade to an older version.
image 1
Downgrading VS Code Extension
  • Select Older Version
Older Version of VS code extension
Older Version of VS code extension
Note: By downgrading the extension doesn’t solve your syntax highlighting problem then only disable it

Method 2: Disable JavaScript and TypeScript Nightly Extension

JavaScript and TypeScript Nightly Extension
JavaScript and TypeScript Nightly Extension
  1. Check whether do you have installed “JavaScript and TypeScript Nightly Extension” installed or not
  2. If installed, Uninstalled/Disable the extension, “JavaScript and TypeScript Nightly Extension” is a syntax highlighting extension.

Method 3: Disable any other syntax highlighting extension

Still, Your problem has not been solved yet, follow this brute-force method to get your syntax highlighting back

  • Check if you have multiple Syantx Highlighting extension
  • Disable all syntax highlighting related extensions.

Conclusion:

In this article I have solved one of the standard issues in VS Code, syntax highlighter not working is very common in frequent in visual studio code. The best way is to always update your extensions if it causes syntax highlighting issues and then downgrade to it older version.

Categorized in: