Skip to content

Commit 16cba19

Browse files
Veykrilbruno-ortiz
authored andcommitted
Remove unnecessary openFile command
1 parent 76432d3 commit 16cba19

File tree

4 files changed

+2
-17
lines changed

4 files changed

+2
-17
lines changed

editors/code/package.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -285,10 +285,6 @@
285285
"title": "Clear flycheck diagnostics",
286286
"category": "rust-analyzer"
287287
},
288-
{
289-
"command": "rust-analyzer.openFile",
290-
"title": "Open File"
291-
},
292288
{
293289
"command": "rust-analyzer.revealDependency",
294290
"title": "Reveal File"
@@ -1979,4 +1975,4 @@
19791975
}
19801976
]
19811977
}
1982-
}
1978+
}

editors/code/src/commands.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -267,16 +267,6 @@ export function openCargoToml(ctx: CtxInit): Cmd {
267267
};
268268
}
269269

270-
export function openFile(_ctx: CtxInit): Cmd {
271-
return async (uri: vscode.Uri) => {
272-
try {
273-
await vscode.window.showTextDocument(uri);
274-
} catch (err) {
275-
await vscode.window.showErrorMessage(err.message);
276-
}
277-
};
278-
}
279-
280270
export function revealDependency(ctx: CtxInit): Cmd {
281271
return async (editor: RustEditor) => {
282272
const rootPath = vscode.workspace.workspaceFolders![0].uri.fsPath;

editors/code/src/dependencies_provider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export class DependencyFile extends vscode.TreeItem {
155155
this.id = this.dependencyPath.toLowerCase();
156156
if (!isDir) {
157157
this.command = {
158-
command: "rust-analyzer.openFile",
158+
command: "vscode.open",
159159
title: "Open File",
160160
arguments: [vscode.Uri.file(this.dependencyPath)],
161161
};

editors/code/src/main.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ function createCommands(): Record<string, CommandFactory> {
192192
showReferences: {enabled: commands.showReferences},
193193
triggerParameterHints: {enabled: commands.triggerParameterHints},
194194
openLogs: {enabled: commands.openLogs},
195-
openFile: {enabled: commands.openFile},
196195
revealDependency: {enabled: commands.revealDependency}
197196
};
198197
}

0 commit comments

Comments
 (0)