Skip to content

Commit

Permalink
removed more unnecessary changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
heejaechang committed Sep 30, 2022
1 parent f86ad52 commit d5a3610
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
28 changes: 14 additions & 14 deletions src/client/activation/node/languageServerProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ export class NodeLanguageServerProxy implements ILanguageServerProxy {
private readonly environmentService: IEnvironmentVariablesProvider,
private readonly workspace: IWorkspaceService,
private readonly extensions: IExtensions,
private readonly configurationService: IConfigurationService,
) {
// Empty
}
Expand Down Expand Up @@ -111,22 +110,23 @@ export class NodeLanguageServerProxy implements ILanguageServerProxy {
if (extension && (extension.exports as PylanceApi).startClient) {
this.pylanceApi = extension.exports as PylanceApi;
await this.pylanceApi.startClient!();
} else {
this.cancellationStrategy = new FileBasedCancellationStrategy();
options.connectionOptions = { cancellationStrategy: this.cancellationStrategy };
return;
}

const client = await this.factory.createLanguageClient(resource, interpreter, options);
this.registerHandlers(client, resource);
this.cancellationStrategy = new FileBasedCancellationStrategy();
options.connectionOptions = { cancellationStrategy: this.cancellationStrategy };

this.disposables.push(
this.workspace.onDidGrantWorkspaceTrust(() => {
client.sendNotification('python/workspaceTrusted', { isTrusted: true });
}),
);
const client = await this.factory.createLanguageClient(resource, interpreter, options);
this.registerHandlers(client, resource);

await client.start();
this.languageClient = client;
}
this.disposables.push(
this.workspace.onDidGrantWorkspaceTrust(() => {
client.sendNotification('python/workspaceTrusted', { isTrusted: true });
}),
);

await client.start();
this.languageClient = client;
}

@traceDecoratorVerbose('Disposing language server')
Expand Down
1 change: 0 additions & 1 deletion src/client/languageServer/pylanceLSExtensionManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ export class PylanceLSExtensionManager implements IDisposable, ILanguageServerEx
environmentService,
workspaceService,
extensions,
configurationService,
);
this.serverManager = new NodeLanguageServerManager(
serviceContainer,
Expand Down

0 comments on commit d5a3610

Please sign in to comment.