mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +00:00
Remove unnecessary openFile command
This commit is contained in:
parent
76432d39cb
commit
16cba19ff3
4 changed files with 2 additions and 17 deletions
|
@ -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 @@
|
|||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)],
|
||||
};
|
||||
|
|
|
@ -192,7 +192,6 @@ function createCommands(): Record<string, CommandFactory> {
|
|||
showReferences: {enabled: commands.showReferences},
|
||||
triggerParameterHints: {enabled: commands.triggerParameterHints},
|
||||
openLogs: {enabled: commands.openLogs},
|
||||
openFile: {enabled: commands.openFile},
|
||||
revealDependency: {enabled: commands.revealDependency}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue