Before anything, sorry if these questions is noobish, but I tried searching the docs and the info on this, maybe because it’s assumed to be common knowledge, has eluded me.
1 In completion (and other type of) files, yoy can specify scope selectors to restrict aplicability of some functionality. And example from the unofficial docs on completions:
"scope": "text.html - source - meta.tag, punctuation.definition.tag.begin"
Now, what does this mean exactly? I assume the , is an OR operator, but how do I understand each of the operands? For example, the section after the comma could mean one of these four things, in pseudo code:
a) scope_stack == [‘punctuation.definition.tag.begin’]
b) scope_stack == […, ‘punctuation.definition.tag.begin’,…]
c) scope_stack == […,‘punctuation.definition.tag.begin’]
d) scope_stack == [‘punctuation.definition.tag.begin,…’]
where ‘…’ means "some, possibly 0, arbitrary elements of the stack.
Which one is the correct interpretation?
And then, how should I read the hyphen-separated list of scopes before the comma?
A related question. In aplugin, say I have a point, and I want to get the full stack of scopes applied to that point. What’s the preferred way to do that?