User-Specific Workspace Settings in VS Code

You can override .vscode/settings.json with settings in code-workspace.json, but more general and flexible overriding does not seem to be possible – I recommend voting for Add ability to extend from other settings files. If you commit both .vscode/settings.json and [name].code-workspace, then it seems like it’ll be difficult for team members to customize their settings.

Nested settings in .vscode/settings.json seem to override [name].code-workspace settings, so you could try committing a workspace file. Some people also commit example files, e.g. settings.json.default and instruct team members to remove the default extension.

I messed around with an example:
example.code-workspace

{
    "folders": [
        {
            "path": "."
        },
        {
            "path": "nested"
        }
    ],
    "settings": {
        "window.zoomLevel": 1,
        "editor.fontSize": 8
    }
}

With nested containing .vscode/settings.json:

{
    "window.zoomLevel": 2,
    "editor.fontSize": 16
}

This works as you’d probably expect: the nested folder settings override the workspace settings, although window.zoomLevel became disabled with a tooltip message saying that it would only be applied if opened directly.

Leave a Comment