Created
May 29, 2017 18:59
-
-
Save naddeoa/f63e90b770040fb7c05cdbe1d94d22f8 to your computer and use it in GitHub Desktop.
Using workspace configurations when writing visual studio code plugins
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "redux-action-completer", | |
"publisher": "naddeo", | |
"contributes": { | |
"configuration": { | |
"type": "object", | |
"title": "My title", | |
"properties": { | |
"options": { | |
"type": "array", | |
"default": [ | |
"option1", | |
"option2" | |
], | |
"description": "Some description" | |
} | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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