aboutsummaryrefslogtreecommitdiff
path: root/code/src/extension.ts
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-08-27 18:58:38 +0100
committerAleksey Kladov <[email protected]>2018-08-27 18:58:38 +0100
commitaaca7d003bd969785be53d8f312b67bfa26f6272 (patch)
tree9e3ab4d75d631fb1055fb6ab5c05f0a78153fadd /code/src/extension.ts
parent846114a6e95da696deb6a0f3243ad23c45074a00 (diff)
move scopes to file
Diffstat (limited to 'code/src/extension.ts')
-rw-r--r--code/src/extension.ts12
1 files changed, 11 insertions, 1 deletions
diff --git a/code/src/extension.ts b/code/src/extension.ts
index c25e8cb61..b9d009776 100644
--- a/code/src/extension.ts
+++ b/code/src/extension.ts
@@ -81,11 +81,21 @@ export function activate(context: vscode.ExtensionContext) {
81 let e = await vscode.window.showTextDocument(doc) 81 let e = await vscode.window.showTextDocument(doc)
82 e.revealRange(range, vscode.TextEditorRevealType.InCenter) 82 e.revealRange(range, vscode.TextEditorRevealType.InCenter)
83 }) 83 })
84 console.log("ping") 84
85 registerCommand('libsyntax-rust.run', async (cmd: ProcessSpec) => { 85 registerCommand('libsyntax-rust.run', async (cmd: ProcessSpec) => {
86 let task = createTask(cmd) 86 let task = createTask(cmd)
87 await vscode.tasks.executeTask(task) 87 await vscode.tasks.executeTask(task)
88 }) 88 })
89 registerCommand('libsyntax-rust.createFile', async (uri_: string) => {
90 console.log(`uri: ${uri_}`)
91 let uri = vscode.Uri.parse(uri_)
92 let edit = new vscode.WorkspaceEdit()
93 edit.createFile(uri)
94 await vscode.workspace.applyEdit(edit)
95 let doc = await vscode.workspace.openTextDocument(uri)
96 await vscode.window.showTextDocument(doc)
97 console.log("Done")
98 })
89 99
90 dispose(vscode.workspace.registerTextDocumentContentProvider( 100 dispose(vscode.workspace.registerTextDocumentContentProvider(
91 'libsyntax-rust', 101 'libsyntax-rust',