Don't show loading and project loading status for in-memory JS/TS files

Fixes #108454
This commit is contained in:
Matt Bierner
2020-10-19 17:18:49 -07:00
parent 8f1117bf44
commit 37c63d6ae5
2 changed files with 5 additions and 2 deletions

View File

@@ -36,11 +36,12 @@ class TypeScriptHoverProvider implements vscode.HoverProvider {
}
return new vscode.Hover(
this.getContents(response.body, response._serverType),
this.getContents(document.uri, response.body, response._serverType),
typeConverters.Range.fromTextSpan(response.body));
}
private getContents(
resource: vscode.Uri,
data: Proto.QuickInfoResponseBody,
source: ServerType | undefined,
) {
@@ -49,7 +50,7 @@ class TypeScriptHoverProvider implements vscode.HoverProvider {
if (data.displayString) {
const displayParts: string[] = [];
if (source === ServerType.Syntax && this.client.capabilities.has(ClientCapability.Semantic)) {
if (source === ServerType.Syntax && this.client.hasCapabilityForResource(resource, ClientCapability.Semantic)) {
displayParts.push(
localize({
key: 'loadingPrefix',

View File

@@ -851,6 +851,8 @@ export default class TypeScriptServiceClient extends Disposable implements IType
break;
}
case EventName.projectsUpdatedInBackground:
this.loadingIndicator.reset();
const body = (event as Proto.ProjectsUpdatedInBackgroundEvent).body;
const resources = body.openFiles.map(file => this.toResource(file));
this.bufferSyncSupport.getErr(resources);