Open jdugan6240 opened 1 year ago
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:
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.
Hi @antoineco, in TypeScript, turning Treesitter on and off can cause inconsistencies in the color of the optional property '?', making it difficult to find them. Here are the comparison images:
Treesitter on:
Treesitter off:
Is there a way to maintain good visibility even when Treesitter is turned on?
Does this issue show up in other tree-sitter aware color schemes, or just Everforest?
The reason I ask is to isolate whether the issue is with Everforest or the Typescript grammar you're using.
Gruvbox:
Other color schemes are working fine. The same issue occurs with gruvbox-material.
@Daydreamer-riri I created a new issue ☝️ Thanks for reporting!
In palette.md, the Tree Sitter colors sometimes do not agree with the regular colors. For example,
aqua
is the constants color normally, butfg
is the Tree Sitter constants color. Similarly,green
is normally the string color, but under Tree Sitter it'saqua
.Are these inconsistencies intended? Or should everforest ports default to the original colors in case of a conflict?