mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 21:35:20 +00:00
Implement lens for impls and support resolving lenses.
This commit is contained in:
parent
13a2bdb0a8
commit
6ac4cca6c1
4 changed files with 97 additions and 3 deletions
|
@ -70,6 +70,18 @@ export function activate(context: vscode.ExtensionContext) {
|
|||
'rust-analyzer.applySourceChange',
|
||||
commands.applySourceChange.handle
|
||||
);
|
||||
registerCommand(
|
||||
'rust-analyzer.showReferences',
|
||||
(uri: string, position: lc.Position, locations: lc.Location[]) => {
|
||||
vscode.commands.executeCommand(
|
||||
'editor.action.showReferences',
|
||||
vscode.Uri.parse(uri),
|
||||
Server.client.protocol2CodeConverter.asPosition(position),
|
||||
locations.map(Server.client.protocol2CodeConverter.asLocation)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
overrideCommand('type', commands.onEnter.handle);
|
||||
|
||||
// Notifications are events triggered by the language server
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue