Add NativeCommands Service
This commit is contained in:
parent
a4366a5061
commit
b9d6659a26
7 changed files with 31 additions and 22 deletions
|
|
@ -1,3 +1,4 @@
|
|||
export * from "./configuration";
|
||||
export * from "./create-document-selector";
|
||||
export * from "./extension-state";
|
||||
export * from "./native-commands";
|
||||
|
|
|
|||
18
src/common/native-commands.ts
Normal file
18
src/common/native-commands.ts
Normal 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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue