sublimehq / sublime_text

Issue tracker for Sublime Text
https://www.sublimetext.com
807 stars 39 forks source link

Add more autogenerated scopes. #2093

Open pykong opened 6 years ago

pykong commented 6 years ago

The new automatically generated scopes are great. However, I expect there will be a widespread use of those scopes not only by the users directly but also by various plugins. (e.g. the upcoming SublimeLinter release will introduce custom highlighting making extensive use of this new scope feature.)

This may lead to collisions and styling artifacts.

Ideally, the repertoire of available autogenerated scopes should be broadened. Some suggestion for new scopes are:

region.greyish
region.brownish
region.blackish

A special scope could be introduced to set the foreground color to that of the background, thereby rendering any unselected text invisible. A potential name for that new autogenerated scope:

region.stealthish
FichteFoll commented 6 years ago

Things like region.blackish (and similarly region.whiteish) can turn out problematic with regard to the contrast between the scheme's background. You probably want region.foreground, but iirc that is already the default if no scope matches - at least for the add_regions API. For syntax definitions, I could maybe see a use case (along with region.background as opposed to region.stealthish), but do you have a real world example for these?