-
Notifications
You must be signed in to change notification settings - Fork 143
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
add example for scoring scope selectors #132
Conversation
Example use:
or
|
this also addresses a bug whereby |
Code looks good, and good idea, thanks! However, this brings up the problem of whether I want to be bug-for-bug compatible with Sublime. So far I've tried to match Sublime's behaviour, and that's possibly even why that code is the way it is in syntect (although I may have just messed up in the same way). I've never had to rule on whether to replicate a bug before. I'd definitely also feel better if there was an official ruling on that issue that it really is a bug they intend to fix soon. I also wonder if changing this would break compatibility with any themes. My head's not in the game enough right now to tell. |
@keith-hall From this thread and this one I also assume you're also interested on this subject... I've made some tests here in order to figure out how |
Nope, sorry, can't help with that. For my purposes, as long as it returns the correct results, how it does so is just an implementation detail that could change any time without really affecting me. If you do find out, it would be of academic interest to me ofc, but I'm happy enough knowing how it works in |
I'm closing this PR for now as the open questions in #132 (comment) seems unaddressed, and since it is nice to keep the PR inbox clean, but of course feel very free to reopen this if I am closing it prematurely. |
This PR adds an example for scoring scope selectors, to make it easier to debug color schemes etc. when multiple selectors match a scope stack, and we want to see which selector has a higher precedence/score.