Update syntax-variables.less to include language entity colors #123
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Suppose you've written a package that makes some sort of editor enhancement. For various reasons, you'd really like to know what color is used to highlight variables in their syntax theme.
The good news is that Pulsar defines a list of variables in
syntax-variables.less
in each of the eight built-in themes which lists this token and others. (Amazingly, not all of them actually consume these variables in the rest of the stylesheets, so it may only be coincidental when the values line up; but B+ for effort.) Pulsar also defines some fallback values so that these values can at least be used consistently in a user's stylesheet file, and in any package stylesheet, without Less complaining about an undefined variable.Somehow, though, these variables never made it to the template that PPM uses to generate new syntax themes. I've fixed that here. I've also taken the liberty of adding two variables —
@syntax-color-comment
and@syntax-color-string
— that I can't believe were excluded from this list initially.Will this make much of a difference when most community themes aren't actively maintained? Maybe not. But the best time to plant a tree was back in 2015 (when some other trees were planted in a different repository) and the second best time is now.