diff --git a/editors/code/package.json b/editors/code/package.json index 5e2a1c69e9..0efc191d74 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -285,10 +285,6 @@ "title": "Clear flycheck diagnostics", "category": "rust-analyzer" }, - { - "command": "rust-analyzer.openFile", - "title": "Open File" - }, { "command": "rust-analyzer.revealDependency", "title": "Reveal File" @@ -1979,4 +1975,4 @@ } ] } -} \ No newline at end of file +} diff --git a/editors/code/src/commands.ts b/editors/code/src/commands.ts index c8b54970a5..70eeab897c 100644 --- a/editors/code/src/commands.ts +++ b/editors/code/src/commands.ts @@ -267,16 +267,6 @@ export function openCargoToml(ctx: CtxInit): Cmd { }; } -export function openFile(_ctx: CtxInit): Cmd { - return async (uri: vscode.Uri) => { - try { - await vscode.window.showTextDocument(uri); - } catch (err) { - await vscode.window.showErrorMessage(err.message); - } - }; -} - export function revealDependency(ctx: CtxInit): Cmd { return async (editor: RustEditor) => { const rootPath = vscode.workspace.workspaceFolders![0].uri.fsPath; diff --git a/editors/code/src/dependencies_provider.ts b/editors/code/src/dependencies_provider.ts index b8b33a9be6..777cb0d33a 100644 --- a/editors/code/src/dependencies_provider.ts +++ b/editors/code/src/dependencies_provider.ts @@ -155,7 +155,7 @@ export class DependencyFile extends vscode.TreeItem { this.id = this.dependencyPath.toLowerCase(); if (!isDir) { this.command = { - command: "rust-analyzer.openFile", + command: "vscode.open", title: "Open File", arguments: [vscode.Uri.file(this.dependencyPath)], }; diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts index 62b2e7a277..774600f6c3 100644 --- a/editors/code/src/main.ts +++ b/editors/code/src/main.ts @@ -192,7 +192,6 @@ function createCommands(): Record { showReferences: {enabled: commands.showReferences}, triggerParameterHints: {enabled: commands.triggerParameterHints}, openLogs: {enabled: commands.openLogs}, - openFile: {enabled: commands.openFile}, revealDependency: {enabled: commands.revealDependency} }; }