Replies: 4 comments 4 replies
-
I don't see a usecase here. We have seperate captures for seperate concepts so the fact that a theme has highlighting for types doesn't matter when dealing with JavaScript because those theme scopes are simpy ignored. You are free to create theme variants for seperate languages but I don't see us adding that to core. |
Beta Was this translation helpful? Give feedback.
-
I'll try to elaborate more. Below you see two screenshots of the same theme, but you will notice that they have a completely different color balance. In this particular case that is caused by the fact that Yellow/Orange was chosen to highlight types. Since JavaScript does not have types, this color completely dissappears, changing the color balance of the theme. A theme designer could compensate for this by using Orange for a subset of javascript keywords, to restore the color balance. In other text editors this is a common practice, and you will see themes advertising the list of languages for which the author "optimized" the theme. |
Beta Was this translation helpful? Give feedback.
-
Some more examples of language specific theming usecases include
Note that for these two features more is needed than just language specific theming. Either simultaneous scopes, or more probably custom highlighting queries with scopes like @pascalkuthe How would one provide themes for separate languages today? I've not been able to find a way to do this, it seems one can only have one global theme at a time. |
Beta Was this translation helpful? Give feedback.
-
Possibilities I currently see to achieve this:
Option 1 and 2 could be added in a plugin system if that system allows supplementing syntax highlighting queries. |
Beta Was this translation helpful? Give feedback.
-
Generic syntax highlighting themes may not fit all languages perfectly. For example, a theme optimized for C# might not work well for Javascript, because C# has types while Javascript has not. Can we allow theme adjustments per language to accomodate dealing with this? If necessary I can work out a specific use case, but I think the reasoning is clear enough. Other text editors, like VSCode, TextMate, Sublime, etc support this by simply having a language moniker at the end of each highlighting scope, like
keyword.storage.cs
.Tangentially related issues:
Beta Was this translation helpful? Give feedback.
All reactions