20

I've recently started coding TypeScript in VS Code, but I did thought that the syntax highlighting is really bad. So I started to Google around and found out that at its best it could look like this:

enter image description here

Mine looks like this:

enter image description here

I am using TypeScript 2.0.3 and working on a mac 10.11.6.

2 Answers 2

82

What helped me was what @Reg1nleifr mentioned in their comment: Switching the color scheme.

Go to Preferences -> Color Theme and change it to Dark+ (default dark).

Sign up to request clarification or add additional context in comments.

2 Comments

Perfect, without installing any other extensions !
After the most recent VS code update introduced the "Dark Modern" theme as default, I'm sure a lot of people will have attempted to change back to their old theme and accidently selected the similar at first glance "Dark (Visual Studio)" theme. This is the mistake I made.
1

The syntax highlighting in VSCode is driven by textmate files. This is the repository : https://github.com/Microsoft/TypeScript-TmLanguage/

It recently (16 days ago) went through a massive refactor : https://github.com/Microsoft/TypeScript-TmLanguage/pull/257 so hopefully it should get better if you update to vscode latest.

More

The best highlighting would come if it was done using the same code the compiler uses to parse the code. That isn't how vscode is architectured at the moment, so I do have my own code that does it : https://basarat.gitbooks.io/alm/content/features/typescript.html#syntax-highlighting

1 Comment

Thanks man, appreciate the help. But I already had the lastest version of vscode installed (Sorry for not mentioning it already). Howerver I found out a trick in code to achieve what i wanted: I went to Preferences -> Color Theme -> Dark (Visual Studio) and changed it to dark+ (default dark)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.