Published at
Updated at
Reading time
1min
This post is part of my Today I learned series in which I share all my web development learnings.

Today I learned that the color theme I use (Yi color theme) does not support semantic syntax highlighting. Semantic what?

Semantic syntax highlighting makes sure your source code is not only beautifully colored, but that used the colors are logical, too.

After learning about this feature, I discovered that my editor's syntax highlighting is very confusing. Functions, methods, arguments and parameters change their color from line to line. I wonder how I never noticed this chaos!

But thanks to VS Code, you can enforce semantic highlighting using the editor.semanticHighlighting.enabled setting (read more in the VS Code docs) so that syntactic tokens don't change colors constantly! 🎉

Visual comparison of code in the Yi theme with/without semantic code highlighting

I turned it on for now. Let's find out if code is easier to grasp or if my brain needs unlogical always changing colors. 🤷‍♂️

If you enjoyed this article...

Join 5.5k readers and learn something new every week with Web Weekly.

Web Weekly — Your friendly Web Dev newsletter
Reply to this post and share your thoughts via good old email.
Stefan standing in the park in front of a green background

About Stefan Judis

Frontend nerd with over ten years of experience, freelance dev, "Today I Learned" blogger, conference speaker, and Open Source maintainer.

Related Topics

Related Articles