Skip to content

Does not work on M1 #26

Open
Open

Description

@loranger

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 ?

Activity

  1. loranger commented on Dec 29, 2021

    @loranger
    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

  2. athrunsun commented on Jan 25, 2022

    @athrunsun

    @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions