Microsoft is currently working on Visual Studio 2022 17.6 and one of the key highlights that’ll be included will be improved syntax highlighting when working on JavaScript/TypeScript files. With the update, the highlighting will be expanded to control keywords, strings in tags, escape characters, JSDocs, and more.
The Redmond company decided to pay attention to improving syntax highlighting after it was requested by the Developer Community. It’s an important feature that allows software developers to differentiate different parts of complex code. Many programmers inherit projects from other employees and sifting through the code to work out what it does is easier when components are separated by different colours.
In the gallery below, you can take a look at before and after comparisons of syntax highlighting in Visual Studio. Even if you don’t write code, you should be able to see how much of a difference the new highlighting makes.
Microsoft said that the different parts of the code, such as variables and escape characters, are mapped to different Display items. If you’re not a fan of the colour choices, just head to Tools > Options > Environment > Fonts and Colors and select Text Editor from the Show settings for dropdown. You can then select the Display item and set the Item foreground, Item background, Font, and Size options as you like.
If you don’t yet have Visual Studio 2022 Preview, you’ll need to download it from the dedicated website. If you do have it, just make sure you have the latest version installed.