mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-26 21:28:04 +00:00
Removing languageServiceEnabled check
After further discussion with the TS team, we determined that we do not need to stop sending semantic commands when the language service disables itself
This commit is contained in:
@@ -22,9 +22,8 @@ export namespace ServerResponse {
|
||||
}
|
||||
|
||||
export const NoContent = new class { readonly type = 'noContent'; };
|
||||
export const LanguageServiceDisabled = new class { readonly type = 'languageServiceDisabled'; };
|
||||
|
||||
export type Response<T extends Proto.Response> = T | Cancelled | typeof NoContent | typeof LanguageServiceDisabled;
|
||||
export type Response<T extends Proto.Response> = T | Cancelled | typeof NoContent;
|
||||
}
|
||||
|
||||
export interface TypeScriptRequestTypes {
|
||||
|
||||
@@ -619,25 +619,6 @@ export default class TypeScriptServiceClient extends Disposable implements IType
|
||||
private executeImpl(command: string, args: any, executeInfo: { isAsync: boolean, token?: vscode.CancellationToken, expectsResult: boolean, lowPriority?: boolean }): Promise<ServerResponse.Response<Proto.Response>>;
|
||||
private executeImpl(command: string, args: any, executeInfo: { isAsync: boolean, token?: vscode.CancellationToken, expectsResult: boolean, lowPriority?: boolean }): Promise<ServerResponse.Response<Proto.Response>> | undefined {
|
||||
const runningServerState = this.service();
|
||||
|
||||
if (!runningServerState.langaugeServiceEnabled) {
|
||||
const nonSemanticCommands: string[] = [
|
||||
'change',
|
||||
'close',
|
||||
'compilerOptionsForInferredProjects',
|
||||
'configure',
|
||||
'format',
|
||||
'formatonkey',
|
||||
'getOutliningSpans',
|
||||
'open',
|
||||
'projectInfo',
|
||||
'reloadProjects',
|
||||
];
|
||||
if (nonSemanticCommands.indexOf(command) === -1) {
|
||||
return Promise.resolve(ServerResponse.LanguageServiceDisabled);
|
||||
}
|
||||
}
|
||||
|
||||
return runningServerState.server.executeImpl(command, args, executeInfo);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user