From dd66e22395a96d35ce4c86488906649af617f571 Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Wed, 3 Mar 2021 15:14:12 -0800 Subject: [PATCH] Fix getDocumenSymbol before didOpen. --- .../src/LanguageServer/Providers/documentSymbolProvider.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Extension/src/LanguageServer/Providers/documentSymbolProvider.ts b/Extension/src/LanguageServer/Providers/documentSymbolProvider.ts index 230b0e3e0c..df70afd923 100644 --- a/Extension/src/LanguageServer/Providers/documentSymbolProvider.ts +++ b/Extension/src/LanguageServer/Providers/documentSymbolProvider.ts @@ -5,6 +5,7 @@ import * as vscode from 'vscode'; import { DefaultClient, LocalizeDocumentSymbol, GetDocumentSymbolRequestParams, GetDocumentSymbolRequest } from '../client'; import * as util from '../../common'; +import { processDelayedDidOpen } from '../extension'; export class DocumentSymbolProvider implements vscode.DocumentSymbolProvider { private client: DefaultClient; @@ -26,6 +27,9 @@ export class DocumentSymbolProvider implements vscode.DocumentSymbolProvider { return documentSymbols; } public async provideDocumentSymbols(document: vscode.TextDocument): Promise { + if (!this.client.TrackedDocuments.has(document)) { + processDelayedDidOpen(document); + } return this.client.requestWhenReady(() => { const params: GetDocumentSymbolRequestParams = { uri: document.uri.toString()