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

  • Eager Eagle@lemmy.world
    link
    fedilink
    English
    arrow-up
    13
    ·
    edit-2
    9 hours ago

    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.

    • 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.