Add NativeCommands Service

This commit is contained in:
Josh Johnson 2018-05-03 22:47:41 -04:00
parent a4366a5061
commit b9d6659a26
7 changed files with 31 additions and 22 deletions

View file

@ -1,3 +1,4 @@
export * from "./configuration";
export * from "./create-document-selector";
export * from "./extension-state";
export * from "./native-commands";

View file

@ -0,0 +1,18 @@
import { commands } from "vscode";
export class NativeCommands {
static async cursorMove(to: string, by: string): Promise<void> {
await commands.executeCommand("cursorMove", {
to: to,
by: by
});
}
static openGlobalSettings(): void {
commands.executeCommand("workbench.action.openGlobalSettings");
}
static setContext(key: string, value: any): void {
commands.executeCommand("setContext", key, value);
}
}