mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 01:58:53 +01:00
Skip diagnostics for non-open md files (#152687)
Currently we only show diagnostics for opened tabs. This means we shouldn't waste time computing diagnostics for these non open files
This commit is contained in:
@@ -75,6 +75,7 @@ class MemoryDiagnosticConfiguration implements DiagnosticConfiguration {
|
||||
}
|
||||
|
||||
class MemoryDiagnosticReporter extends DiagnosticReporter {
|
||||
|
||||
private readonly diagnostics = new ResourceMap<readonly vscode.Diagnostic[]>();
|
||||
|
||||
override dispose(): void {
|
||||
@@ -91,6 +92,10 @@ class MemoryDiagnosticReporter extends DiagnosticReporter {
|
||||
this.diagnostics.set(uri, diagnostics);
|
||||
}
|
||||
|
||||
areDiagnosticsEnabled(_uri: vscode.Uri): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
delete(uri: vscode.Uri): void {
|
||||
this.diagnostics.delete(uri);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user