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

  • chasteinsect@programming.devOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    8 hours 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.