aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/extension.ts
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/src/extension.ts')
-rw-r--r--editors/code/src/extension.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/editors/code/src/extension.ts b/editors/code/src/extension.ts
index 0b2a6095b..a0be70202 100644
--- a/editors/code/src/extension.ts
+++ b/editors/code/src/extension.ts
@@ -70,6 +70,18 @@ export function activate(context: vscode.ExtensionContext) {
70 'rust-analyzer.applySourceChange', 70 'rust-analyzer.applySourceChange',
71 commands.applySourceChange.handle 71 commands.applySourceChange.handle
72 ); 72 );
73 registerCommand(
74 'rust-analyzer.showReferences',
75 (uri: string, position: lc.Position, locations: lc.Location[]) => {
76 vscode.commands.executeCommand(
77 'editor.action.showReferences',
78 vscode.Uri.parse(uri),
79 Server.client.protocol2CodeConverter.asPosition(position),
80 locations.map(Server.client.protocol2CodeConverter.asLocation)
81 );
82 }
83 );
84
73 overrideCommand('type', commands.onEnter.handle); 85 overrideCommand('type', commands.onEnter.handle);
74 86
75 // Notifications are events triggered by the language server 87 // Notifications are events triggered by the language server