Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 3 additions & 23 deletions src/client/activation/jedi/languageServerProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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 {
Expand Down Expand Up @@ -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,
});
}),
);
}
}
4 changes: 2 additions & 2 deletions src/client/languageServer/jediLSExtensionManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down