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

Does not work on M1 #26

Open
loranger opened this issue Dec 17, 2021 · 2 comments
Open

Does not work on M1 #26

loranger opened this issue Dec 17, 2021 · 2 comments

Comments

@loranger
Copy link

Hi,

I went from Mac Intel to MBP M1 and my ColorHighlight pugin stopped working.
I can't figure out why, because I was already using ST4 and python3.

Does one of you was able to make it work under Apple M1 ?

@loranger
Copy link
Author

It's still bothering me, so I tried to digg a little deeper.

I finally came to the conclusion that my issue does not have anything related to Apple M1, Sublime Text 4 or Python version.

It seems there is an issue with the color scheme which makes this plugin fails on a fresh install :
When the plugin is loading, it uses the current color scheme in order to use it, backup up and change it:

path = settings.get('color_scheme') or DEFAULT_COLOR_SCHEME
if not path.startswith('Packages/'):
    path = 'Packages/Color Scheme - Default/' + path
self.path = path[8:]

But as far as I understand, Sublime Text does not assume color scheme is loaded or stored in Packages/Color Scheme - Default anymore, so the plugin fails to load and backup the current color scheme, throws an exception and stop working.

I tried to change some stuffs, commenting code, changing paths, but I'm not experimented enough to make it work properly (or pushing a PR)
The only workaround I found was to create the missing Packages/Color Scheme - Default/ path and duplicating my current color scheme there. Now it works for me, but this solution is definitely not future proof.
Maybe @Kronuz would find an more elegant fix…

It may be related to #25 and #22

@athrunsun
Copy link

@loranger
On my MacOS M1, I installed Gravity theme package and I have "color_scheme": "One Dark Gravity.sublime-color-scheme" in settings by default, it doesn't start with "Packages/" so this plugin will compose color scheme path by path = 'Packages/Color Scheme - Default/' + path, which is incorrect.

We can set "color_scheme": "Packages/Theme - Gravity/One Dark Gravity.sublime-color-scheme", however another issue arose - sublime text won't be able to find /Users/[username]/Library/Application Support/Sublime Text 3/Packages/Default/Preferences.sublime-settings.

So your solution is the best solution so far.

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