Tree Sitter colors contradict standard colors
In palette.md, the Tree Sitter colors sometimes do not agree with the regular colors. For example, aqua is the constants color normally, but fg is the Tree Sitter constants color. Similarly, green is normally the string color, but under Tree Sitter it's aqua.
Are these inconsistencies intended? Or should everforest ports default to the original colors in case of a conflict?
I also got confused by this when I started contributing to Everforest, but sainnhe explained in some other issue that those differences are indeed by design. It's been on my to-do list to document some of the design decisions around the color scheme, but I never took the time to properly do it.
Here is the rationale:
The Vim syntax mechanism is not as expressive as Tree-sitter, and can't achieve the same granularity of syntax highlighting as Tree-sitter (in most languages). For that reason, you often end up with less nuances to work with in the Vim syntax compared to Tree-sitter. Instead of trying to perfectly mirror the semantics across Vim syntax and Tree-sitter—which is in a lot of cases impossible—the choice was made to try designing both with a certain independence so that:
- Tree-sitter doesn't have to suffer from the limitations of Vim's core highlight groups (in some cases the Tree-sitter capture groups aren't even equivalent to Vim's highlight groups)
- Vim syntax doesn't have to look weird or inconsistent in languages that do not have syntax rules which match well to Tree-sitter
Besides the colors which are sometimes distributed differently, you will also notice that the usage of italics doesn't follow the same rules between Vim syntax and Tree-sitter, otherwise in some cases the Vim syntax would be overly italicized, etc.
I hope I managed to answer your question accurately :)
Ok, fair enough. That answers my question quite nicely.
Do you want to keep this issue open, so others can more easily see the answer to this question instead of writing another issue about it?
Yes please. This will also be a reminder for me to finally push this documentation to the palette doc.