Skip to content

Commit a4ba1b0

Browse files
committed
Always open documents in the Razor LSP
1 parent 94ea900 commit a4ba1b0

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/razor/src/Document/RazorDocumentManager.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export class RazorDocumentManager implements IRazorDocumentManager {
5050
// succeed. Without this, even a simple diagnostics request will fail in Roslyn if the user just opens a .razor document
5151
// and leaves it open past the timeout.
5252
if (this.razorDocumentGenerationInitialized) {
53-
await this.ensureProjectedDocumentsOpen(document);
53+
await this.ensureDocumentAndProjectedDocumentsOpen(document);
5454
}
5555

5656
return document;
@@ -306,10 +306,6 @@ export class RazorDocumentManager implements IRazorDocumentManager {
306306
await vscode.workspace.openTextDocument(razorUri);
307307
}
308308

309-
await this.ensureProjectedDocumentsOpen(document);
310-
}
311-
312-
private async ensureProjectedDocumentsOpen(document: IRazorDocument) {
313309
await vscode.workspace.openTextDocument(document.csharpDocument.uri);
314310
await vscode.workspace.openTextDocument(document.htmlDocument.uri);
315311
}

0 commit comments

Comments
 (0)