Add inRustProject when-clause for commands.

This commit is contained in:
vsrs 2020-05-27 19:40:13 +03:00
parent 94889b6472
commit f3e04fbbab
3 changed files with 76 additions and 1 deletions

View file

@ -94,3 +94,8 @@ export function isValidExecutable(path: string): boolean {
return res.status === 0;
}
/** Sets ['when'](https://code.visualstudio.com/docs/getstarted/keybindings#_when-clause-contexts) clause contexts */
export function setContextValue(key: string, value: any): Thenable<void> {
return vscode.commands.executeCommand('setContext', key, value);
}