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

The selector name from the color scheme is not shown anymore #40

Closed
aziz opened this issue Oct 19, 2017 · 7 comments
Closed

The selector name from the color scheme is not shown anymore #40

aziz opened this issue Oct 19, 2017 · 7 comments

Comments

@aziz
Copy link

aziz commented Oct 19, 2017

I have "selector": true is my user settings and the default settings still has this description

    // Show the selector names and scopes
    // responsible for the color and styles
    "selectors": false,

But I don't get the matched selector name from the color scheme anymore. It's very helpful when there's a conflicting rule that overrides your rule and you want to find out which rule is causing it.
I hope you can bring it back soon.

Support Info

  • ST ver.: 3150
  • Platform: osx
  • Arch: x64
  • Plugin ver.: 2.8.0
  • Install via PC: True
  • mdpopups ver.: 2.1.1
  • markdown ver.: 2.6.9
  • pygments ver.: 2.1a0
  • jinja2 ver.: 2.8
@facelessuser
Copy link
Owner

facelessuser commented Oct 19, 2017

Unfortunately, this is known and done on purpose. This is because of the major scheme changes that came with scheme changes. See documentation warning: http://facelessuser.github.io/ScopeHunter/usage/#scope-info.

I actually have the ability to parse the new scheme format and provide the same information (I can recursively resolve variables, blend colors with blenda and blend, handle rgb, rgba, hsl, hsla, color names, and hex values with alpha). But those weren't the only changes.

Now any package can override the base color scheme. I have no way to pull in a complete merged scheme of all these overrides. All I'm able to do is use view.style and view.style_for_scope` to get the current merged color for a scope. I have no way to actually acquire what override rule is responsible for that color, or even get the final base color that was mused before blending with the background.

So yeah, this was all calculated based on the new changes.

@facelessuser
Copy link
Owner

I could theoretically provide this info if it was just desired on the base scheme without overrides applied.

@aziz
Copy link
Author

aziz commented Oct 19, 2017

I get it. It seems like something that Sublime should provide as part of the styles_for_scope API
I would like to see the selector name (if there's any) and the file that it comes from.

@facelessuser
Copy link
Owner

I'd like to see it as well. I could add a feature that takes the current scheme and copies it with a unique name, applies it, so we are only analyzing the base without overrides. Bit I'm not sure if people are looking for such a mode.

@facelessuser
Copy link
Owner

Sounds like there is a possibility to add the functionality back: https://forum.sublimetext.com/t/st3-scopehunter/8783/36. It's more work, but it is most likely possible.

@facelessuser
Copy link
Owner

Okay, I've decided to add this back in. Hopefully find_resources actually matches merge order of Sublime internally. I have it working locally, but I have to try out some more cases to fully understand the new override system and how it handles certain cases.

Turns out it wasn't as much work as I thought it would be.

@facelessuser
Copy link
Owner

Ahh, yeah. The scopes are back!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants