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

opening at the same time the same workspace local and remote flips flops the color #469

Closed marco-m closed 2 years ago

marco-m commented 2 years ago

Versions

Describe the bug

If you open the same workspace in two vscode windows, one local and one with the Remote extension, the color of the two windows will become the same, with one of the two wrong (both get the remote color or both get the local color).

To Reproduce Steps to reproduce the behavior:

  1. local: create workspace and give it a color with Peacock.
  2. open a second window (keep the first one, local, opened) in Remote mode, with the same workspace.
  3. in the remote window, set a different Peacock color (this color is saved correctly as peacock.remoteColor in the code-workspace file.
  4. Immediately, the first window (the local one), gets the same color of the remote one.

Expected behavior

I expected the local window to show the local color (peacock.color) and the remote window to show the remote color (peacock.remoteColor)

Screenshots

I am happy to provide screenshots if needed.

Additional context

Hello, thanks for Peacock!

I am opening this as a bug because the behavior is quite confusing. I read the many tickets about the Remote integration and the trickiness of it, so maybe what I am asking is not technically feasible. If this is the case, then the documentation at https://www.peacockcode.dev/guide/#remote-development-integration should clearly state the limitation.

I think I understand the problem: Peacock sets workbench.colorCustomizations, and it seems that this setting is somehow global, vscode is not able to differentiate between local and remote view.

johnpapa commented 2 years ago

Thank you @marco-m for creating this issue!

marco-m commented 2 years ago

The workaround I found is to have two code-workspace files, for example local.code-workspace and remote.code-workspace, and then open them separately. This works, although they will go out of sync.

willpower232 commented 2 years ago

This makes sense since the source of colour is the local configuration file, I'm not sure how else you would achieve this other than a plural of configuration files.

johnpapa commented 2 years ago

I understand the concern, but I am not sure how to resolve this beyond separate files, which is not something easily implementable. There are other issues related to how vs code inherently handles settings files (saving to github, for example) as well.

Only one set of colors is stored at one time: remote or local.

Closing this "as designed"