diff options
| author | Lukas Wirth <lukastw97@gmail.com> | 2022-07-17 17:45:43 +0200 |
|---|---|---|
| committer | Bruno Ortiz <brunortiz11@gmail.com> | 2023-05-02 10:48:38 -0300 |
| commit | 16cba19ff3324c4703bf861b96af97bc622e1d6a (patch) | |
| tree | 44d0567ba969288f370c91fa3f5a473eada5da21 /editors/code | |
| parent | 76432d39cb01423ca3c3add391218269d95c46a4 (diff) | |
| download | rust-16cba19ff3324c4703bf861b96af97bc622e1d6a.tar.gz rust-16cba19ff3324c4703bf861b96af97bc622e1d6a.zip | |
Remove unnecessary openFile command
Diffstat (limited to 'editors/code')
| -rw-r--r-- | editors/code/package.json | 6 | ||||
| -rw-r--r-- | editors/code/src/commands.ts | 10 | ||||
| -rw-r--r-- | editors/code/src/dependencies_provider.ts | 2 | ||||
| -rw-r--r-- | editors/code/src/main.ts | 1 |
4 files changed, 2 insertions, 17 deletions
diff --git a/editors/code/package.json b/editors/code/package.json index 5e2a1c69e94..0efc191d748 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -286,10 +286,6 @@ "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 c8b54970a5f..70eeab897c9 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 b8b33a9be6a..777cb0d33a7 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 62b2e7a2771..774600f6c39 100644 --- a/editors/code/src/main.ts +++ b/editors/code/src/main.ts @@ -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} }; } |
