Skip to content

Instantly share code, notes, and snippets.

@naddeoa
Created May 29, 2017 18:59
Show Gist options
  • Save naddeoa/f63e90b770040fb7c05cdbe1d94d22f8 to your computer and use it in GitHub Desktop.
Save naddeoa/f63e90b770040fb7c05cdbe1d94d22f8 to your computer and use it in GitHub Desktop.
Using workspace configurations when writing visual studio code plugins
{
"name": "redux-action-completer",
"publisher": "naddeo",
"contributes": {
"configuration": {
"type": "object",
"title": "My title",
"properties": {
"options": {
"type": "array",
"default": [
"option1",
"option2"
],
"description": "Some description"
}
}
}
}
}
import { Uri, languages, Disposable, WorkspaceConfiguration, workspace } from 'vscode';
const config = workspace.getConfiguration(); // empty to get your own plugin's configuration
const options = config.get("options");
console.log(options); // ["option1", "option2"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment