Yes, you’re right. But I was talking about nesting two different scopes. (I’ve been tinkering with punctuation recently, so that’s what I was thinking about specifically.) For example, if you take the following CSS:
.someclass
“someclass” has a scope of: “source.css meta.selector.css entity.other.attribute-name.class.css”
While the dot has a scope of: “source.css meta.selector.css entity.other.attribute-name.class.css punctuation.definition.entity.css”
The way to style the punctuation in this case is to use a scope like “entity.other punctuation”.
In practice, this gets quite cumbersome. Here’s an example from one of my (probably misguided) styles:
{
"name": "Green",
"scope": "entity.name.class, entity.other.inherited-class, entity.name.function, entity.other.attribute-name, markup.inserted, at.tag.workflow, hash.tag.workflow, meta.task.completed.workflow punctuation",
"settings": {
"background": "#99cc0005",
"foreground": "#669900"
}
},
{
"name": "Green Punctuation",
"scope": "entity.name.class punctuation, entity.other.inherited-class punctuation, entity.name.function punctuation, entity.other.attribute-name punctuation, markup.inserted punctuation",
"settings": {
"foreground": "#99cc00"
}
},
I could be wrong, but this seemed to me to be the least painful way to write this out.
I would have preferred something like:
entity.name.class, entity.other.inherited-class, entity.name.function, entity.other.attribute-name, markup.inserted {
background:lighten(@green, 100);
foreground:@green;
punctuation {
foreground:lighten(@green,20);
}
}
Does this make sense?