This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 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(
9696 if ( resp && Array . isArray ( resp ) ) {
9797 return resp . map ( ( val ) => {
9898 return prepareVSCodeConfig ( val , ( key , cfg ) => {
99- cfg [ key ] = config . discoveredWorkspaces ;
99+ if ( key === "linkedProjects" ) {
100+ cfg [ key ] = config . discoveredWorkspaces ;
101+ }
100102 } ) ;
101103 } ) ;
102104 } else {
Original file line number Diff line number Diff line change @@ -287,6 +287,14 @@ export class Config {
287287 }
288288}
289289
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.
290298export function prepareVSCodeConfig < T > (
291299 resp : T ,
292300 cb ?: ( key : Extract < keyof T , string > , res : { [ key : string ] : any } ) => void
You can’t perform that action at this time.
0 commit comments