Skip to content

Commit 38e66b0

Browse files
author
Kartik Raj
committed
Address code reviews
1 parent 6e5a305 commit 38e66b0

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

src/client/activation/common/analysisOptions.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@ export abstract class LanguageServerAnalysisOptionsBase implements ILanguageServ
5555
}
5656

5757
protected async getInitializationOptions(): Promise<any> {
58-
return {
59-
trustedWorkspaceSupport: true,
60-
};
58+
return undefined;
6159
}
6260
}
6361

src/client/activation/node/analysisOptions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export class NodeLanguageServerAnalysisOptions extends LanguageServerAnalysisOpt
1414
protected async getInitializationOptions() {
1515
return {
1616
experimentationSupport: true,
17+
trustedWorkspaceSupport: true,
1718
};
1819
}
1920
}

src/client/activation/node/languageServerProxy.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,6 @@ export class NodeLanguageServerProxy implements ILanguageServerProxy {
127127
if (e.newState === State.Running) {
128128
this.registerHandlers(resource);
129129
}
130-
this.languageClient!.onReady().then(() => {
131-
this.disposables.push(
132-
this.languageClient!.onRequest('python/isTrustedWorkspace', async () => {
133-
return {
134-
isTrusted: this.workspace.isTrusted,
135-
};
136-
}),
137-
);
138-
});
139130
});
140131

141132
this.disposables.push(
@@ -243,5 +234,13 @@ export class NodeLanguageServerProxy implements ILanguageServerProxy {
243234
return { value };
244235
},
245236
);
237+
238+
this.disposables.push(
239+
this.languageClient!.onRequest('python/isTrustedWorkspace', async () => {
240+
return {
241+
isTrusted: this.workspace.isTrusted,
242+
};
243+
}),
244+
);
246245
}
247246
}

0 commit comments

Comments
 (0)