skip to Main Content

I have (builtin) settings sync on in VSCode. For various workspaces I use the the workspace settings to give titleBar of each workspace a different color for easy recognition. However everytime I re-open a workspace (for which I set workspace settings for titleBar colorCustomizations) VSCode tries to overwrite the values in workspace settings.json into the ones used in user settings.json.

Example the workspace settings.json I set for the workspace:

{
  "workbench.colorCustomizations": {
    "titleBar.activeBackground": "#f558be",
    "titleBar.activeForeground": "#ffffff",
    "titleBar.inactiveBackground": "#f424ac",
    "titleBar.inactiveForeground": "#cccccc",
    "editorGhostText.border": "#d94e4e",
    "editorGhostText.foreground": "#b95454",
  },
}

Which at re-opening are overwritten and thus changed into:

{
  "workbench.colorCustomizations": {
    "editorGhostText.border": "#d94e4e",
    "editorGhostText.foreground": "#b95454"
  },
}

I tried setting:

  "settingsSync.ignoredSettings": [
    "workbench.colorCustomizations"
  ],

in User settings, but that seems only works on user settings, as it does not solve my issue. The settingsSync.ignoredSettings, which might solve my issue, can not be set on Workspace settings.

I tried adding vscode/ or vscode/settings.json to the .gitignore file of my project, but issue remains.

How can I avoid VSCode trying to overwrite my workspace settings?

2

Answers


  1. Chosen as BEST ANSWER

    Turns out I have installed an extension which already deals with UI colors called Peacock. It overrides the workspace settings. When I disable it the issue is gone. It looks nice actually, so better just start using it.


  2. According to the documentation Settings precedence "later scopes override earlier scopes", and Workspace comes after User.

    Values with Object type are merged – like workbench.colorCustomizations then:

    If there are conflicting values, such as editor.selectionBackground in the example above, the usual override behavior occurs, with workspace values taking precedence over user values, and language-specific values taking precedence over non-language-specific values.

    Does the problem go away if you disable Sync?

    Are you using the latest version of VS Code?

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search