this post was submitted on 15 Jan 2026
25 points (80.5% liked)

Programming

24429 readers
263 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
 

This is an older blog post I came across while reading this related one on syntax highlighting:

I am sorry, but everyone is getting syntax highlighting wrong @ tonsky.me. It was posted here 3 months ago.

I think both make great points and has pushed me to into a rabbit hole of re-writing my current Nord theme into something a bit more minimal, only for me to eventually realize Nord theme with barely any syntax highlighting (mostly white text) looks very bleak and I didn't want to spend the time to hunt all the highlight groups to make things look good, so I tried out the Alabaster theme, which the guy from the 2nd article created and I love it, feels like it really hits that middle spot between too much highlighting and not enough.

Here's the theme I used for nvim :

https://github.com/p00f/alabaster.nvim?tab=readme-ov-file

I changed some things (matching bracket background color for visibility, comments grayed out and property names of tables should be yellow, instead green).

You can see the picture of how it looks here

top 20 comments
sorted by: hot top controversial new old
[–] eager_eagle@lemmy.world 21 points 1 day ago* (last edited 1 day ago) (2 children)

it's fine to prefer less colors, but man, that (2025) blog post is all over the place...

Sometimes it gets so bad one can’t see the base text color: everything is highlighted. What’s the base text color here?

why does the base color matter at all? What is "base" anyway when every word has a syntactic meaning?

Here’s a quick test. Try to find the function definition here:

It's funny to see how this test backfired depending on the person in hacker news, lobster, and lemmy threads. Clearly a personal preference phrased as absolute truth.

But the crux of why the post doesn't make sense is assuming this would matter at all:

Here’s another test. Close your eyes (not yet! Finish this sentence first) and try to remember what color your color theme uses for class names?

Can you?

If the answer for both questions is “no”, then your color theme is not functional.

No, it doesn't. And it boggles my mind why someone would think that failing to recall colors-to-syntax pairs would mean the theme has failed you. Visualizing colors, more often than not, is not even a conscious effort. Colors are a subtle aid to guide your attention to the parts that matter.

Can you see it? I misspelled return for retunr and its color switched from red to purple.

This would/should be better caught by a static checker anyway.

But the best part is that the post contradicts itself: the suggested minimal theme doesn't even address that typo use case mentioned above, because it doesn't feature a distinct color for special keywords. So if one were to follow the post's advice, return and retunr would look exactly the same, making it worse than the colorful theme it criticizes.

Close your eyes and try to remember where key "b" is located in your keyboard. If you can't, keyboard is dysfunctional. Yeah, they pulled this argument out of their ass.

[–] chasteinsect@programming.dev 1 points 1 day ago

why does the base color matter at all? What is “base” anyway when every word has a syntactic meaning?

Well.. the base color is about establishing a baseline of neutrality so that the deviations (the highlights) actually register as signals. Like he said "if everything is highlighted, nothing stands out". If you highlight an entire page of a book, you haven't highlighted anything, you’ve just printed the book on yellow paper.

why does the base color matter at all? What is “base” anyway when every word has a syntactic meaning?

I think there exists both passive usage of colors (feeling the structure through colors) and active usage (consciously looking for "green" when you need a "string"). The author is suggesting that with too much highlighting you can't use the latter.

But the best part is that the post contradicts itself: the suggested minimal theme doesn’t even address that typo use case mentioned above, because it doesn’t feature a distinct color for special keywords. So if one were to follow the post’s advice, return and retunr would look exactly the same, making it worse than the colorful theme it criticizes.

True, but I think he showed that to illustrate a broader point that current themes are so noisy that even when color changes you don't notice it, not that somehow his minimal theme would help spot it.

[–] tomenzgg@midwest.social 11 points 1 day ago (1 children)

Doesn't resonate with me, I'm afraid; the initial images are too much highlighting but much preferable, for me, than the suggested adjustment.

[–] JakoJakoJako13@piefed.social 6 points 1 day ago

Yeah. This article pops up every once in a while and it's always the same reaction. Skittles color schemes can suck. Good thing there's an infinite amount of color schemes to pick from or create your own. AND the suggested solution this article gives also sucks. The bold and italics tip is cool but everybody has different tastes.

I color keywords, comments, strings, and constants. Italics are used for function names and comments. Then errors and warnings are a red/yellow color. I can spot right away where I fucked up because the color of the word changes. It looks good to me and I can tell where everything is unlike in the examples given in the article.

[–] brian@programming.dev 6 points 1 day ago (1 children)

I went and read Rob Pike's comments in the thread linked (I'm not a Go person so don't see anything he normally says). It's crazy that this person is listing his comments as a pro, or that he gets any reverence whatsoever. he seems absolutely insufferable.

[–] chasteinsect@programming.dev 1 points 1 day ago (1 children)

Yep, he does not like syntax highlighting at all. I think some is still useful.

[–] brian@programming.dev 4 points 1 day ago (1 children)

yeah but like, his other comments are purely inflammatory, there's even a "you can't hold me accountable, I was quoting the bible!" line

sorry, entirely unrelated to the original post, just bothered me that this guy was being discussed in a positive light lol

[–] soc@programming.dev 1 points 7 hours ago

spitzensparken blinkelichtzen

What a fucking retard that guy is.

[–] grue@lemmy.world 5 points 1 day ago* (last edited 1 day ago) (1 children)

I like the way you presented the ctrl-c blog post as sort of introductory to the tonsky.me one. The second one is much more useful in terms of exploring the details and making specific recommendations, but the first one does a good job of motivating why I should care.

Also, it's funny how both authors are kinda beating around the edges of literate programming e.g. in their discussion of code comments being one of the things worth highlighting, without ever quite getting there.

[–] chasteinsect@programming.dev 2 points 1 day ago (1 children)

Thanks! I have never heard of literate programming before.

[–] grue@lemmy.world 2 points 1 day ago

IMO Jupyter notebooks are a good example to look into first, if you want something more contemporary and somewhat widely-used than "tangle and weave."

[–] TechnoCat@piefed.social 3 points 1 day ago* (last edited 1 day ago)
[–] exussum@lemmy.world 3 points 1 day ago (1 children)

I'm of that minority. I don't like looking at Skittles all day so I never turned it on way back when. When I see it it's uncomfortable. But I've been so comfortable reading code, I don't think I've felt like I'm missing something by not having syntax highlighting.

The only time it's ever useful is on the missing braces and the such, but I've built so many habits that I don't run into that often and when I do I have very simple ways of getting around it. 🤷

[–] chasteinsect@programming.dev 2 points 1 day ago (1 children)

Like someone said in some thread that I read awhile back : -- "if I wanted rainbows, I'd code in fucking skittles" 😂

[–] exussum@lemmy.world 2 points 1 day ago

The key takeaway for me is if you're used to it, stopping or starting is like flipping your portrait photos on a vertical axis. I'm sure if I started and stuck with it, I would get used to it. But then I'm also picky enough that when my color schemes change from job to job, or software to software, I would just get annoyed.

[–] calliope@retrolemmy.com 3 points 1 day ago* (last edited 1 day ago) (1 children)

The tonsky article says:

The tradition of using grey for comments comes from the times when people were paid by line.

I have never heard of programmers being paid by the line!

[–] grue@lemmy.world 3 points 1 day ago (1 children)

It's a joke (and a bit of a dig on javadoc-esque documentation).

[–] calliope@retrolemmy.com 1 points 1 day ago

Oh duh, that makes sense.

[–] mohyoo@lemmy.world 1 points 1 day ago

I think everyone has an opinion on this, it's like preferring light/dark theme you know... we see things differently.