mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
move scopes to file
This commit is contained in:
parent
846114a6e9
commit
aaca7d003b
11 changed files with 280 additions and 196 deletions
|
@ -81,11 +81,21 @@ export function activate(context: vscode.ExtensionContext) {
|
|||
let e = await vscode.window.showTextDocument(doc)
|
||||
e.revealRange(range, vscode.TextEditorRevealType.InCenter)
|
||||
})
|
||||
console.log("ping")
|
||||
|
||||
registerCommand('libsyntax-rust.run', async (cmd: ProcessSpec) => {
|
||||
let task = createTask(cmd)
|
||||
await vscode.tasks.executeTask(task)
|
||||
})
|
||||
registerCommand('libsyntax-rust.createFile', async (uri_: string) => {
|
||||
console.log(`uri: ${uri_}`)
|
||||
let uri = vscode.Uri.parse(uri_)
|
||||
let edit = new vscode.WorkspaceEdit()
|
||||
edit.createFile(uri)
|
||||
await vscode.workspace.applyEdit(edit)
|
||||
let doc = await vscode.workspace.openTextDocument(uri)
|
||||
await vscode.window.showTextDocument(doc)
|
||||
console.log("Done")
|
||||
})
|
||||
|
||||
dispose(vscode.workspace.registerTextDocumentContentProvider(
|
||||
'libsyntax-rust',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue