The way the ST2 API works is that you set a region to highlight, and you give your scope. To try and dynamically pick a scope would turn out horrible depending on what is getting highighlighted. What if the the region being highlighted spans multiple scopes, which scope would I pick? And in the case of curly, and square etc. you would just get a boring white with your current color scheme.
The way I personally do it is assign different brackets scopes that I make up “brackethighighter.curly”, “brackethighlighter.square”, etc. And then I define them in my theme file. You can do this if you like.
Right now ruby keywords are linked to the default. If you change your settings file to this, you will have red for the default.
[pre=#2D2D2D] “default”: {
“icon”: “dot”,
“color”: “keyword”,
“style”: “underline”
},[/pre]
If you want greater control, you can create a special style for ruby keywords.
[pre=#2D2D2D] 191 // Ruby conditional statements
192 {
193 “name”: “ruby”,
194 “open”: “(^\s*\b(?:if|until|unless|while|begin|class|module|def\b\s*[a-zA-Z_]+)|do)\b”,
195 “close”: “\b(end)\b”,
196 “style”: “rubykeywords”,
197 “scope_exclude”: “string”, “comment”],
198 “plugin_library”: “bh_modules.rubykeywords”,
199 “language_filter”: “whitelist”,
200 “language_list”: “Ruby”],
201 “enabled”: true
202 },
…
242 “rubykeywords”: {
243 “icon”: “dot”,
244 “color”: “keyword”,
245 “style”: “underline”
246 },[/pre]
Anything you omit in the style object defers to what is in the default style.
If you want even greater control, make up a scope and add it to your theme file.
[pre=#2D2D2D] “rubykeywords”: {
“icon”: “dot”,
“color”: “madeup.scope”,
“style”: “underline”
},[/pre]
[pre=#2D2D2D]
name
Made up Scope
scope
madeup.scope
settings
foreground
#99CC99
[/pre]
The sky is the limit.