Visual studio better javascript syntax highlighting

Mihai F 20 Reputation points
2023-04-15T16:49:26.52+00:00

This is my syntax highlighting setup in C# and C/C++: User's image

Keywords are orange and classes and other objects are blue.

Now when I work in javascript this is how it looks:
User's image

The keywords are orange which is a good thing, but the classes are white(Vector2).
This is where I changed the colors in the option menu:
User's image

I also did this in the C++ items, however I can't seem to find items for javascript. How to add color to javascript classes?

Developer technologies Visual Studio Other
Developer technologies C#
0 comments No comments
{count} votes

Accepted answer
  1. Anna Xiu-MSFT 31,056 Reputation points Microsoft External Staff
    2023-04-17T09:40:21.64+00:00

    Hi @Mihai F

    Welcome to Microsoft Q&A!

    Which version of Visual Studio are you using? Please update it to the latest version with Visual Studio installer. 

    I tested with the latest version of VS2022 Community version 17.5.4. The class color in JavaScript file can be changed through User Types – Classes option.

    User's image

    If you want more richer syntax highlighting for JavaScript file, you can use the Visual Studio 2022 Preview version.

    Sincerely,

    Anna


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.