Sublime Forum

ST3: ScopeHunter

#21

Did you restart sublime after installing?

0 Likes

#22

yes, I did restarted ST
btw, Iā€™m on Win 7 x64, STx64

0 Likes

#23

I canā€™t think of any windows specific things that would break it. Are you getting errors in the console?

0 Likes

#24

reloading plugin ScopeHunter.scope_hunter reloading Packages/ScopeHunter/scope_hunter.sublime-settings reloading plugin ScopeHunter.scope_hunter_notify Unhandled exception in thread started by <function sh_loop at 0x0000000004984488> Traceback (most recent call last): File "scope_hunter in C:\Users\Fichte\AppData\Roaming\Sublime Text 3\Installed Packages\ScopeHunter.sublime-package", line 629, in sh_loop AttributeError: 'NoneType' object has no attribute 'ignore_all'

Edit: That only happens when disabling and enabling the plugin btw. You should close the sh_loop thread in plugin_unloaded.

Other than that it works fine. Iā€™m just a bit annoyed by the verbosity, imo the information can be condensed quite some.

Edit2: Your usage of the global keyword is also rather inconsistent. Sometimes you use it (when you donā€™t need to) and sometimes you donā€™t. You generally only need to use it when assigning to a non-local variable, reading will be forwarded upwards.

Edit3: In fact, I would prefer nonlocal in pretty much all cases since you define the default value very early in the code and itā€™s a more defensive style of coding because trying to reference a non-existant nonlocal identifier raises while globaling one just creates it (and is not a great idea in general).

0 Likes

#25

Yeah, that is a scenario I havenā€™t bothered to test. I can look into that. So, basically it works in Windows; thatā€™s what I thought because I havenā€™t changed anything since Friday (when I last tested Windows) that would be platform specific.

I am open to suggestions.

Yeah, some of that could be cleaned up, but it isnā€™t really a big deal. I only really need it when I am directly changing the variable. I can modify the object all day long without needing to use ā€œglobalā€ since I am not changing the actual variable, but everything works, so that kind of stuff usually gets overlooked.

0 Likes

#26

Release 1.4.6

Thanks to @FichteFoll for finding it, a bug where when disabling and reenabling a package caused an error has now been fixed. This bug actually existing on a number of my plugins that employ the same threading mechanism, so it was good to get this fixed across the board.

I have verified this works in OSX and Windows. So I will need more info from you, @Binocular222, if I am to troubleshoot your issuer further. I would look in the console, and also check if other plugins are somehow interfering, double check your settings file is not corrupt, and possibly consider a Sublime revert as I am unable to reproduce your issue.

0 Likes

#27

Still nothing happens, even console display nothing

0 Likes

#28

Make sure the package isnā€™t disabled in Package Control (Iā€™ve seen package control do that on occasion, but I imagine you wouldnā€™t see the plugin commands in the command palette if that was the case; but check anyways). If that doesnā€™t work, try a Sublime revert. Right now, that is the best I can offer as I am on Windows x64 ST3x64@3071 and it is working fine for me. Without any additional info, I can only assume you have some local anomaly that no one else has; I simply cannot fix what I cannot observe to be broken, I am sorry I canā€™t do more.

0 Likes

#29

Release 1.5.0

Changes

  • Tooltips are less verbose
  • Tooltips are more compact
  • Tooltips now generate images for color boxes
  • CSS changes to tooltips
  • Better control of tooltip content
  • Dividers between multiselect scopes
  • Added messages.

Important!
Tooltips now only work on 3072. There were some changes in the Sublime API that Scope Hunter is now taking advantage of, so if you want tooltips to still look good, please upgrade Sublime to 3072 or disable tooltips.

There have also been some settings changes to give users even better control of the info shown:

  • Discontinue show_color_scheme_info settings.
  • Added styling, selectors, and file_paths options to show respective info.
  • Remove css_file setting. ScopeHunter now always uses either dark or light css depending on brightness of the userā€™s color scheme. So if you would like to change the tooltip theme, please override those in the settings file.
0 Likes

#30

Given some time, I may be able to generate transparent color boxes that show a checkered pattern behind it. Completely possible now that I am generating images for color boxes :ugeek:.

0 Likes

#31

Had a little more time and got transparent color squares working which will be included in the next release.

I probably wonā€™t make another release until I am certain the tooltip API isnā€™t going to change much anymore, or when the next public beta hits.

0 Likes

#32

ScopeHunter 2.8.0 is released and handles .sublime-color-scheme files. Should show results based on overrides as well. Some things it may have shown before may not be shown now due to the way data is acquired via the new API, but a plus side is ScopeHunter will now always show the most up to date info while before it could show slightly old info if the color scheme was updated behind the scenes.

Again, let me know if you run into bugs in the latest release.

0 Likes

#33

Just an FYI for people using ScopeHunter on 3150+. Due to the new override system of scheme files, and the fact that the API only exposes the merged final style, I canā€™t provide info anymore like the scope responsible for bold or italic, or what scope influenced the background etc. So the fact that they arenā€™t shown was done on purpose.

I have the ability to parse the format, but I donā€™t have an easy way to aggregate all the overrides and essentially import a single merged copy. It could be done if I scanned all the packages and merged each override (assuming I could reliably get the order correctly), but I imagine there is no solid way to guarantee Iā€™d get the order correctā€¦and Iā€™m not going to spend time scanning all the packages. If there ever is a way to pull in the fully merged copy of the scheme to parse it raw, then this will change, but since that is not currently possible, some info you may be used to is omitted.

0 Likes

#34

Relevant discussion:

0 Likes

#35

I believe you should be able to execute sublime.find_resources('Name.sublime-color-scheme') and load the resulting files in order. The only thing this wouldnā€™t get you is if the file was in an extracted override versus inside of a .sublime-package file.

1 Like

#36

Thanks @wbond, itā€™s something to consider. find_resources sounds like a good approach. I have to now decide how much I care to pursue this :slight_smile:. With enough logic, Iā€™m sure I could resolve all this override logic. Using load_resources would definitely solve where Iā€™m extracting from. Though I guess you also have to be aware if the unpacked override is a sublime-color-schemeā€¦so you canā€™t just blindly call load_resources.

@wbond, I assume if the unpacked and packed theme style format varies, the sublime-color-scheme is preferred, is that the appropriate assumption? I gather this only because syntax seem to work that way, so I imagine Sublime would treat color schemes the same.

If I were to do this, I wonā€™t know when one of the overrides change, so reloading would be based solely off when preferred scheme updates in the view or preference file (but to be honest, this is no different than it was pre 3150). I could also add a manual refresh trigger in the popup.

Iā€™ll consider this.

0 Likes

#37

Haha, I understand!

0 Likes

#38

Alright, it was actually pretty easy to add support for overrides. So 2.9.0 adds back familiar features and hopefully aggregates all the overrides proper. Report bugs if you find them.

0 Likes