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

Allow peacock settings to be saved and retrieved from file other than `.vscode/settings.json` #512

Open marvingreenberg opened 1 year ago

marvingreenberg commented 1 year ago

Describe the solution you'd like I'd like the ability to set a global setting like

  "peacock.configFile": "${workspaceFolder}/.vscode/peacock-settings.json"

And then when peacock saves and retrieves colors for a project from a separate file, than the workspace .vscode/settings.json. In certain projects I have found it useful to commit .vscode/settings.json to version control - say when defining debugging configurations or other properties that SHOULD be committed, to help collaborate with other using vscode. But the color scheme for a workspace is a personal preference.

Describe alternatives you've considered None really. It may be that moving settings into a separate file is complex and violates principals of the vscode extensions architecture. Simplest may be to just say "won't fix", and its a minor point.

johnpapa commented 1 year ago

Thank you @marvingreenberg for creating this issue!

NekoApocalypse commented 1 year ago

I second this. In our project we want to sync certain linter and debug settings so we do commit .vscode/settings.json to version control.

And it doesn't seem possible to style the UI without writing things to the vscode settings.

Perhaps setting up a multi-root workspace would help. But I haven't tried it yet.

royemosby commented 1 year ago

bump. I Love Peacock but I don't like .vscode directories littering my filesystem when I update with my computer's configs in VS Code. It would be nice if the plugin would save all themes in a single config.

MartinSGill commented 1 year ago

Themes don't write themselves into settings.json, but instead into user settings: %APPDATA%\Code\User\settings.json

Perhaps that's where Peacock needs to write its settings as well. It would need to be able to save settings based on workspaces so possibly a structure like this:

  "peackock": {
    "workspaces": {
      "<workspacename/path>": {
        "activityBar.activeBackground": "#ff6433",
        "...": "...",
        "titleBar.inactiveBackground": "#ff3d0099",
        "titleBar.inactiveForeground": "#e7e7e799"
      }
    }
  }
MartinSGill commented 1 year ago

Having looked around a bit, isn't this a duplicate of #7 ?

MallocArray commented 1 year ago

This is my major reason for not using Peacock, as we also commit this file to the repo and I don't want to force colors on other team members, but it sure would be helpful to set colors to my different workspaces so I can keep them straight.

andrzejwalk commented 1 year ago

has anyone found a workaround?

DallasO commented 11 months ago

TL;DR - A workaround is, don't commit the Peacock configuration?

In my case at least, we rarely update settings.json. We set our team configuration at the beginning of the project and have not committed a change since. I'm the only one on my team using Peacock as far as I'm aware, and rarely stage changes using git add -all, but there have been cases I accidentally committed and pushed my Peacock configuration. The last change we needed, I stashed my Peacock settings, made the required change, and unstashed.

I'm more annoyed at seeing a pending change all the time in the Source Control tab, and having to remove Peacock's settings to remove work trees (I extensively use git worktree).

Some other solutions such as #7 or #517 defeat the purpose of this extension for me, and would be detrimental with work trees. How would I easily know I'm working on our production branch vs a feature branch?

Having a dedicated settings file for this extension would be ideal, but I assume it is not possible to override the VSCode theme in such a manner.

AlexSapoznikov commented 3 months ago

I rarely close my workspace. Could we just have an option to not save anything at all? It's easier to re-apply theme from favourites when opening workspace.