aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorJeremy Kolb <[email protected]>2019-02-01 13:44:23 +0000
committerkjeremy <[email protected]>2019-02-04 13:45:33 +0000
commit6ac4cca6c1fc188ae0fda62fb81a9855a51b7530 (patch)
treeff72e9d32f18489fcef72d4ae7d1882d53540748 /editors
parent13a2bdb0a89260e978ba8e55abd7a51a003e62a7 (diff)
Implement lens for impls and support resolving lenses.
Diffstat (limited to 'editors')
-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