File tree 2 files changed +11
-1
lines changed 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,9 @@ export async function createClient(
96
96
if ( resp && Array . isArray ( resp ) ) {
97
97
return resp . map ( ( val ) => {
98
98
return prepareVSCodeConfig ( val , ( key , cfg ) => {
99
- cfg [ key ] = config . discoveredWorkspaces ;
99
+ if ( key === "linkedProjects" ) {
100
+ cfg [ key ] = config . discoveredWorkspaces ;
101
+ }
100
102
} ) ;
101
103
} ) ;
102
104
} else {
Original file line number Diff line number Diff line change @@ -287,6 +287,14 @@ export class Config {
287
287
}
288
288
}
289
289
290
+ // the optional `cb?` parameter is meant to be used to add additional
291
+ // key/value pairs to the VS Code configuration. This needed for, e.g.,
292
+ // including a `rust-project.json` into the `linkedProjects` key as part
293
+ // of the configuration/InitializationParams _without_ causing VS Code
294
+ // configuration to be written out to workspace-level settings. This is
295
+ // undesirable behavior because rust-project.json files can be tens of
296
+ // thousands of lines of JSON, most of which is not meant for humans
297
+ // to interact with.
290
298
export function prepareVSCodeConfig < T > (
291
299
resp : T ,
292
300
cb ?: ( key : Extract < keyof T , string > , res : { [ key : string ] : any } ) => void
You can’t perform that action at this time.
0 commit comments