diff --git a/src/client/activation/jedi/languageServerProxy.ts b/src/client/activation/jedi/languageServerProxy.ts index b63e7c133858..766e077dc0df 100644 --- a/src/client/activation/jedi/languageServerProxy.ts +++ b/src/client/activation/jedi/languageServerProxy.ts @@ -2,15 +2,10 @@ // Licensed under the MIT License. import '../../common/extensions'; -import { - DidChangeConfigurationNotification, - Disposable, - LanguageClient, - LanguageClientOptions, -} from 'vscode-languageclient/node'; +import { Disposable, LanguageClient, LanguageClientOptions } from 'vscode-languageclient/node'; import { ChildProcess } from 'child_process'; -import { IInterpreterPathService, Resource } from '../../common/types'; +import { Resource } from '../../common/types'; import { PythonEnvironment } from '../../pythonEnvironments/info'; import { captureTelemetry } from '../../telemetry'; import { EventName } from '../../telemetry/constants'; @@ -27,10 +22,7 @@ export class JediLanguageServerProxy implements ILanguageServerProxy { private lsVersion: string | undefined; - constructor( - private readonly factory: ILanguageClientFactory, - private readonly interpreterPathService: IInterpreterPathService, - ) {} + constructor(private readonly factory: ILanguageClientFactory) {} private static versionTelemetryProps(instance: JediLanguageServerProxy) { return { @@ -112,17 +104,5 @@ export class JediLanguageServerProxy implements ILanguageServerProxy { private registerHandlers(client: LanguageClient) { const progressReporting = new ProgressReporting(client); this.disposables.push(progressReporting); - - this.disposables.push( - this.interpreterPathService.onDidChange(() => { - // Manually send didChangeConfiguration in order to get the server to re-query - // the workspace configurations (to then pick up pythonPath set in the middleware). - // This is needed as interpreter changes via the interpreter path service happen - // outside of VS Code's settings (which would mean VS Code sends the config updates itself). - client.sendNotification(DidChangeConfigurationNotification.type, { - settings: null, - }); - }), - ); } } diff --git a/src/client/languageServer/jediLSExtensionManager.ts b/src/client/languageServer/jediLSExtensionManager.ts index c30c5e425ba6..eef146aee4d9 100644 --- a/src/client/languageServer/jediLSExtensionManager.ts +++ b/src/client/languageServer/jediLSExtensionManager.ts @@ -37,7 +37,7 @@ export class JediLSExtensionManager extends LanguageServerCapabilities _experimentService: IExperimentService, workspaceService: IWorkspaceService, configurationService: IConfigurationService, - interpreterPathService: IInterpreterPathService, + _interpreterPathService: IInterpreterPathService, interpreterService: IInterpreterService, environmentService: IEnvironmentVariablesProvider, commandManager: ICommandManager, @@ -51,7 +51,7 @@ export class JediLSExtensionManager extends LanguageServerCapabilities workspaceService, ); this.clientFactory = new JediLanguageClientFactory(interpreterService); - this.serverProxy = new JediLanguageServerProxy(this.clientFactory, interpreterPathService); + this.serverProxy = new JediLanguageServerProxy(this.clientFactory); this.serverManager = new JediLanguageServerManager( serviceContainer, this.analysisOptions,