be5invis / vscode-custom-css

Custom CSS Plugin for Visual Studio Code. Based on vscode-icon
MIT License
878 stars 67 forks source link

MacOS Install #204

Closed Bug-Reaper closed 1 year ago

Bug-Reaper commented 1 year ago

Background

I come as a late hold-over from the Atom editor marketshare that Microsoft murdered. With atom, it was quite trivial to add custom CSS animations via a global CSS file that had access to everything displayed. Anyways, I'm here now.

Issue TLDR

MacOS install instructions incomplete or at the very least confusing.

Issue Story

Tried to install this plugin and couldn't get it to activate. Cannot locate either /Applications/Visual Studio Code.app or ~/Applications/Visual Studio Code.app so no idea where MacOS placed the damn thing. Did see chown comments in readme.md and after enabling vs code from the command line. Was able to get some chown comments off but it ended up bricking future ability to run code from the terminal and now if I go to re-enable vs-code from the CLI it gives me a permissions error.

Chown screenshots. You can see the path install for code get messed up in realtime mostly.

Screenshot 2023-10-21 at 12 45 38 AM

Bricked error when try to re-enable code path

Screenshot 2023-10-21 at 12 47 51 AM

Unsure if it's easier to revive Atom via fork that allows for easier plugin set-up directly through GH links. Or to get custom CSS animations to work in VS-Code and try to port over my 3k+ lines of atom CSS 🤷‍♂️

Can definitely write a review where appropriate so VS-Code team knows this is important.

Bug-Reaper commented 1 year ago

Figured out that the Visual Studio Code.app was installed directly to my downloads folder. Had no luck whatsoever running chown on files inside the .app context. It appears that this type of manip is expressly forbidden by the OS even with sudo. Best I could do was:

  1. Move the files out of .app.
  2. CHOWN the files whilst outside of the .app context.
  3. Move the files back into the .app context.

Even still, stuck with:

Screenshot 2023-10-21 at 1 02 22 AM

When attempt to enable custom CSS/JS

be5invis commented 1 year ago

You can try launching VSCod with Sudo and see what will happen... I do not have Macintosh machines so I cannot debug this for now.

Bug-Reaper commented 1 year ago

Thanks @be5invis figured out with hint from synthwave plugin docs

or Linux and Mac users, Code must not be installed in a read-only location and you must have write permissions.

Manually moved the Visual Studio Code.app from ~/Downloads/ to /Applications/ and it worked fine. MacOS generally requires a special permission to do anything procedural that touches files inside ~/Downloads, ~/Documents, ~/Desktop, etc....

Unclear if my chown magic earlier had anything to do with current success. Will try to re-create a fresh install at some point and PR anything useful onto the readme.md