Only update settings when the user explicitly selects a favorite color
See original GitHub issueThe problem
While I fully understand that this extension is intended for workspace specific usage, I have set my colors in the user settings (globally). User settings are stored in the following locations (outside the workspace):
- Windows
%APPDATA%\Code\User\settings.json
- macOS
$HOME/Library/Application Support/Code/User/settings.json
- Linux
$HOME/.config/Code/User/settings.json
Every time I open a new instance of Visual Studio Code, my local (workspace) settings.json file is overwritten by my user (global) settings. Often, I collaborate on projects that source control the settings.json file. This is very frustrating, as I always have to manually discard these changes.
Ideally, I could use this extension to colorize my IDE with only needing to set my user settings. Then I could set my workspace settings.json later, individually when I need to.
The solution
The solution is rather simple. I would love for this extension to only write to the workspace settings.json file when the user explicitly selects a new favorite color. This would prevent the need to manually discard implicit changes that occur when opening the IDE with user settings, and the extension overwrites the workspace settings.
Describe alternatives you’ve considered
An alternative, but more complex option would be to calculate deltas on global settings, and let them override workspace settings – taking on an aggregate color scheme for example. In this scenario, if the user has some colors from the user settings that are different than the colors in the workspace, take all colors from the user and remaining colors from the workspace - use that as the theme.
Additional context
Here is a list of related issues, as they exist today. It appears as though there is a misconception around the intent of this extension. Again, I understand it was initially designed for workspace only - but since Visual Studio Code lets developers specify user settings, those should be accounted for.
- Peacock without a workspace: Allow option for colors to only affect one user and one instance
- Don’t write settings if they already exist
- Make it more obvious that peacock can only work in a workspace
- Feature Request Workspace Color Customization Overrides
- Don’t reset the color scheme every time Code opens
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
Thanks.
I feel this is out of scope for peacock and not something I’ll be adding to it.
Managing settings (various types exist - default - user - workspace ) is quite complicated. The code reflects this now. Having this new behavior would fundamentally change how parts of peacock work and user expectations.
I recommend that if you want user settings that you grab the colors form peacock that you want, save those in settings, then remove peacock.
Thank you @IEvangelist for creating this issue!