hoovercj/vscode-api-playground

[Settings Cycler] Nested settings are clobbered, and should be merged instead

Opened this issue · 0 comments

[background info, as the issue was at first that it's not working, but then i figured it out. see below. join me on this small adventure]

I'm trying to cycle colorCustomizations, but it seemed to not be working. The setting is

    "workbench.colorCustomizations": {
        "editorIndentGuide.activeBackground": "#969896",
        "editorWarning.foreground": "#de935f40",
    },

and the cycling settings i've tried are

    "settings.cycle": [{
        "id": "warningSquiggles",
        "overrideWorkspaceSettings": true,
        "values": [{
            "workbench.colorCustomizations.editorWarning.foreground": "#de935f",
            "workbench.colorCustomizations.editorError.foreground": "#d13b2e",
        }, {
            "workbench.colorCustomizations.editorWarning.foreground": "#de935f20",
            "workbench.colorCustomizations.editorError.foreground": "#d13b2e20",
        }]
    }],

and (which worked!)

    "settings.cycle": [{
        "id": "warningSquiggles",
        "overrideWorkspaceSettings": true,
        "values": [{
            "workbench.colorCustomizations": {
                "editorWarning.foreground": "#de935f",
                "editorError.foreground": "#d13b2e"
            },
        }, {
            "workbench.colorCustomizations": {
                "editorWarning.foreground": "#de935f40",
                "editorError.foreground": "#d13b2e40"
            }
        }]
    }],

However, even though this works, if i were to have other colour customizations, they are clobbered and removed.

Thanks for the extension, it does the trick!