Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TextMate scope selectors: child combinator is not implemented #123

Closed
graceful-potato opened this issue Jan 31, 2020 · 6 comments · Fixed by #233
Closed

TextMate scope selectors: child combinator is not implemented #123

graceful-potato opened this issue Jan 31, 2020 · 6 comments · Fixed by #233
Labels
feature-request Request for new features or functionality

Comments

@graceful-potato
Copy link

Selectors such as "scope1 > scope2" aren't working.

Expected behavior:
it should select all scope2 elements that are the direct children of scope1

@jeff-hykin
Copy link

jeff-hykin commented Feb 1, 2020

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

@alexdima
Copy link
Member

alexdima commented Feb 3, 2020

@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 alexdima added the feature-request Request for new features or functionality label Feb 3, 2020
@graceful-potato
Copy link
Author

@alexdima To be honest i found out about this selector quite recently, but the changelog says it was introduced in 2012.

@DerekZiemba
Copy link

I'd sure make use of it if it was documented and supported. Besides the changelog, there's really no documentation about it.

@ghost
Copy link

ghost commented Dec 30, 2021

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 😄)

@aleclarson
Copy link
Contributor

I've implemented this feature in #233

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants