Open graceful-potato opened 4 years ago
It isn't mentioned explicitly, but I imagine it was intentionally left out in the same way the negation operator was. Which is a shame since both of them can be really useful.
There is a third kind of selector, one that involves excluding scopes, which we'll not discuss here. We didn't add support for this kind and we've noticed it is rarely used in the wild.
from https://code.visualstudio.com/blogs/2017/02/08/syntax-highlighting-optimizations#_parent-selectors
@jeff-hykin AFAIK >
did not exist when we first wrote vscode-textmate
. I cannot find any mention of it at https://macromates.com/manual/en/scope_selectors
However, with TextMate 2.0, it appears that they appear in the scope selector grammar at https://macromates.com/textmate/manual/references#scope-selector
@alexdima To be honest i found out about this selector quite recently, but the changelog says it was introduced in 2012.
I'd sure make use of it if it was documented and supported. Besides the changelog, there's really no documentation about it.
Atom's first-mate
helpers don't support it. Seeing as this module is more closely linked to Atom than Textmate, it will most likely remain on the backburner. There is an upstream issue at atom/first-mate#123 (opened by yours truly 😄)
I've implemented this feature in #233
Selectors such as
"scope1 > scope2"
aren't working.Expected behavior: it should select all
scope2
elements that are the direct children ofscope1