22// Licensed under the MIT License.
33
44import '../../common/extensions' ;
5- import {
6- DidChangeConfigurationNotification ,
7- Disposable ,
8- LanguageClient ,
9- LanguageClientOptions ,
10- } from 'vscode-languageclient/node' ;
5+ import { Disposable , LanguageClient , LanguageClientOptions } from 'vscode-languageclient/node' ;
116
127import { ChildProcess } from 'child_process' ;
13- import { IInterpreterPathService , Resource } from '../../common/types' ;
8+ import { Resource } from '../../common/types' ;
149import { PythonEnvironment } from '../../pythonEnvironments/info' ;
1510import { captureTelemetry } from '../../telemetry' ;
1611import { EventName } from '../../telemetry/constants' ;
@@ -27,10 +22,7 @@ export class JediLanguageServerProxy implements ILanguageServerProxy {
2722
2823 private lsVersion : string | undefined ;
2924
30- constructor (
31- private readonly factory : ILanguageClientFactory ,
32- private readonly interpreterPathService : IInterpreterPathService ,
33- ) { }
25+ constructor ( private readonly factory : ILanguageClientFactory ) { }
3426
3527 private static versionTelemetryProps ( instance : JediLanguageServerProxy ) {
3628 return {
@@ -112,17 +104,5 @@ export class JediLanguageServerProxy implements ILanguageServerProxy {
112104 private registerHandlers ( client : LanguageClient ) {
113105 const progressReporting = new ProgressReporting ( client ) ;
114106 this . disposables . push ( progressReporting ) ;
115-
116- this . disposables . push (
117- this . interpreterPathService . onDidChange ( ( ) => {
118- // Manually send didChangeConfiguration in order to get the server to re-query
119- // the workspace configurations (to then pick up pythonPath set in the middleware).
120- // This is needed as interpreter changes via the interpreter path service happen
121- // outside of VS Code's settings (which would mean VS Code sends the config updates itself).
122- client . sendNotification ( DidChangeConfigurationNotification . type , {
123- settings : null ,
124- } ) ;
125- } ) ,
126- ) ;
127107 }
128108}
0 commit comments