Binaryify / OneDark-Pro

Atom's iconic One Dark theme for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=zhuangtongfa.Material-theme
MIT License
1.52k stars 289 forks source link

OneDark-Pro incorrectly runs as workspace extension #362

Closed erothmayer closed 4 years ago

erothmayer commented 4 years ago

I have OneDark-Pro enabled, but when I open a workspace in a container it gets disabled and flips back to the default theme. This is because the extension does not declare an extensionKind, and so it's being run on the remote.

The fix is to correct the package.json to declare the extensionKind as ui (see: https://code.visualstudio.com/api/advanced-topics/remote-extensions#incorrect-execution-location)

I have tested this with a local override in my settings.json and everything seems to work as expected. However, I'm not familiar enough with VSCode theme development to tell if this may have other side effects. It may require further testing.

Note: until the issue is fixed and released, others facing the same problem can work around it by adding the following to their own settings.json:

    "remote.extensionKind": {
        "zhuangtongfa.material-theme": "ui"
    }
Binaryify commented 4 years ago

does the v3.2.0 fixed this problem

erothmayer commented 4 years ago

@Binaryify I believe it does. I updated to the latest version, removed my settings.json override, and checked that the theme renders properly when the workspace is mounted in a container.

Thanks for the quick turnaround!

sbatten commented 4 years ago

@Binaryify with the next release of VS Code, the extensionKind value in the package.json should take an array of strings. Excluding either workspace or ui is strict and currently, it is strictly ui. This means that the theme cannot be installed on the browser-based version of code.

If possible, the value should be updated to ["ui", "workspace"] preferring to run locally but allowing remote install.

Please see the documentation here for an explanation. https://code.visualstudio.com/api/advanced-topics/remote-extensions#incorrect-execution-location