vscode-peacock icon indicating copy to clipboard operation
vscode-peacock copied to clipboard

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

Open marvingreenberg opened this issue 1 year ago • 9 comments

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.

marvingreenberg avatar Feb 17 '23 16:02 marvingreenberg

Thank you @marvingreenberg for creating this issue!

johnpapa avatar Feb 17 '23 16:02 johnpapa

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.

NekoApocalypse avatar Feb 21 '23 08:02 NekoApocalypse

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.

royemosby avatar Mar 28 '23 12:03 royemosby

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 avatar Apr 28 '23 09:04 MartinSGill

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

MartinSGill avatar Apr 28 '23 09:04 MartinSGill

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.

MallocArray avatar Jun 01 '23 18:06 MallocArray

has anyone found a workaround?

andrzejwalk avatar Jul 03 '23 10:07 andrzejwalk

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.

DallasO avatar Sep 28 '23 20:09 DallasO