mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
Don't show loading and project loading status for in-memory JS/TS files
Fixes #108454
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user