mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
Use explicit flag to enable TS server project wide intellisense (#171208)
This commit is contained in:
parent
7daa453220
commit
848d300e8c
|
@ -10,7 +10,7 @@ import { ClientCapabilities, ClientCapability, ServerType } from '../typescriptS
|
||||||
import API from '../utils/api';
|
import API from '../utils/api';
|
||||||
import { SyntaxServerConfiguration, TsServerLogLevel, TypeScriptServiceConfiguration } from '../utils/configuration';
|
import { SyntaxServerConfiguration, TsServerLogLevel, TypeScriptServiceConfiguration } from '../utils/configuration';
|
||||||
import { Logger } from '../utils/logger';
|
import { Logger } from '../utils/logger';
|
||||||
import { isWeb } from '../utils/platform';
|
import { isWeb, isWebAndHasSharedArrayBuffers } from '../utils/platform';
|
||||||
import { TypeScriptPluginPathsProvider } from '../utils/pluginPathsProvider';
|
import { TypeScriptPluginPathsProvider } from '../utils/pluginPathsProvider';
|
||||||
import { PluginManager } from '../utils/plugins';
|
import { PluginManager } from '../utils/plugins';
|
||||||
import { TelemetryReporter } from '../utils/telemetry';
|
import { TelemetryReporter } from '../utils/telemetry';
|
||||||
|
@ -261,6 +261,10 @@ export class TypeScriptServerSpawner {
|
||||||
|
|
||||||
args.push('--validateDefaultNpmLocation');
|
args.push('--validateDefaultNpmLocation');
|
||||||
|
|
||||||
|
if (isWebAndHasSharedArrayBuffers()) {
|
||||||
|
args.push('--enableProjectWideIntelliSenseOnWeb');
|
||||||
|
}
|
||||||
|
|
||||||
return { args, tsServerLogFile, tsServerTraceDirectory };
|
return { args, tsServerLogFile, tsServerTraceDirectory };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -544,7 +544,7 @@ async function initializeSession(args: string[], extensionUri: URI, platform: st
|
||||||
};
|
};
|
||||||
|
|
||||||
let sys: ServerHostWithImport;
|
let sys: ServerHostWithImport;
|
||||||
if (serverMode === ts.LanguageServiceMode.Semantic) {
|
if (hasArgument(args, '--enableProjectWideIntelliSenseOnWeb')) {
|
||||||
const connection = new ClientConnection<Requests>(ports.sync);
|
const connection = new ClientConnection<Requests>(ports.sync);
|
||||||
await connection.serviceReady();
|
await connection.serviceReady();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue