Skip to content

Instantly share code, notes, and snippets.

@sketchbuch
Last active January 24, 2020 07:07
Show Gist options
  • Save sketchbuch/07a0b87ec57a50f9898f0579f721998e to your computer and use it in GitHub Desktop.
Save sketchbuch/07a0b87ec57a50f9898f0579f721998e to your computer and use it in GitHub Desktop.
VSC - An example of how to control visibility of a view container's views in a VSC Extension
// Update the value used by a view's "when" condition
// Can't use in getChildren()
vscode.commands.executeCommand('setContext', someContextVar, isVisibleBoolean);
// Package.json
/*
...
"views": {
"viewsContainerId": [
{
"id": "some-view",
"name": "A view",
"when": "someContextVar"
},
},
...
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment