johnpapa / vscode-peacock

Subtly change the color of your Visual Studio Code workspace. Ideal when you have multiple VS Code instances, use VS Live Share, or use VS Code's Remote features, and you want to quickly identify your editor.
MIT License
1.03k stars 115 forks source link

Rewrite global settings in VSCode with workspace colors #509

Open lazzzaroni opened 1 year ago

lazzzaroni commented 1 year ago

Versions (please complete the following information):

Describe the bug If I open in VSCode project which already have defined Peacock colors, extension (or something else) copy and apply these defined colors from this particular workspace into global settings against my will.

To Reproduce

  1. Open new instance of VSCode
  2. Open global settings.json, find and remove "workbench.colorCustomizations": {...} if you have it
  3. In new VSCode instance, open project folder with Peacock-defined colors
  4. Wait for a couple of seconds
  5. Take a look at global settings.json - now we have "workbench.colorCustomizations" option applied globally with all colors from project's root/.vscode/settings.json

Expected behavior Global settings stay untouched.

Screenshots

https://user-images.githubusercontent.com/68731150/208683322-4c265c95-09c4-48dc-a195-6e9c360735e3.mov

Additional context It was tested with "Night Owl" and "Monokai Pro" themes. I assume that your current theme doesn't matter.

I don't want to redefine global workspace colors each time when I move to different projects with their settings.

johnpapa commented 1 year ago

Thank you @lazzzaroni for creating this issue!

Nova38 commented 1 year ago

Hi, I love this extension and have been using it for a few years and appreciate the hard work that has gone into this amazing. I always have several vscode windows open and it really helps when switching between them. I currently had to disable it and manually add the snippet that it inserted into the workspaces as I kept running into this issue.

I would love to help out, if need be, to resolve this. If so could you point me in the direction of where the error might be coming from as a starting palace that a would be helpful.

Nova38 commented 1 year ago

Hmm it seems the problem is reproducible when I removed the extension. Perhaps the issue lies in vs code instead of the peacock?

I had a workspace that had the settings configured by peacock a while pack and after removing peacock opening a new window from that window seemed to reproduce this issue