Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'editors/code/src/client.ts')
| -rw-r--r-- | editors/code/src/client.ts | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/editors/code/src/client.ts b/editors/code/src/client.ts index 542233e7b9..bf58112916 100644 --- a/editors/code/src/client.ts +++ b/editors/code/src/client.ts @@ -42,16 +42,7 @@ export async function createClient( const resp = await next(params, token); if (resp && Array.isArray(resp)) { return resp.map((val) => { - return prepareVSCodeConfig(val, (key, cfg) => { - // we only want to set discovered workspaces on the right key - // and if a workspace has been discovered. - if ( - key === "linkedProjects" && - config.discoveredWorkspaces.length > 0 - ) { - cfg[key] = config.discoveredWorkspaces; - } - }); + return prepareVSCodeConfig(val); }); } else { return resp; @@ -347,7 +338,8 @@ class ExperimentalFeatures implements lc.StaticFeature { "rust-analyzer.debugSingle", "rust-analyzer.showReferences", "rust-analyzer.gotoLocation", - "editor.action.triggerParameterHints", + "rust-analyzer.triggerParameterHints", + "rust-analyzer.rename", ], }, ...capabilities.experimental, @@ -400,14 +392,18 @@ function isCodeActionWithoutEditsAndCommands(value: any): boolean { // to proxy around that. We store the last hover's reference command link // here, as only one hover can be active at a time, and we don't need to // keep a history of these. -export let HOVER_REFERENCE_COMMAND: ra.CommandLink | undefined = undefined; +export let HOVER_REFERENCE_COMMAND: ra.CommandLink[] = []; function renderCommand(cmd: ra.CommandLink): string { - HOVER_REFERENCE_COMMAND = cmd; - return `[${cmd.title}](command:rust-analyzer.hoverRefCommandProxy '${cmd.tooltip}')`; + HOVER_REFERENCE_COMMAND.push(cmd); + return `[${cmd.title}](command:rust-analyzer.hoverRefCommandProxy?${ + HOVER_REFERENCE_COMMAND.length - 1 + } '${cmd.tooltip}')`; } function renderHoverActions(actions: ra.CommandLinkGroup[]): vscode.MarkdownString { + // clean up the previous hover ref command + HOVER_REFERENCE_COMMAND = []; const text = actions .map( (group) => |