diff options
author | Jeremy Kolb <[email protected]> | 2019-02-01 13:44:23 +0000 |
---|---|---|
committer | kjeremy <[email protected]> | 2019-02-04 13:45:33 +0000 |
commit | 6ac4cca6c1fc188ae0fda62fb81a9855a51b7530 (patch) | |
tree | ff72e9d32f18489fcef72d4ae7d1882d53540748 /editors/code/src | |
parent | 13a2bdb0a89260e978ba8e55abd7a51a003e62a7 (diff) |
Implement lens for impls and support resolving lenses.
Diffstat (limited to 'editors/code/src')
-rw-r--r-- | editors/code/src/extension.ts | 12 |
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 |