Use cache when validating with value providers

This commit is contained in:
Christopher Schleiden
2022-11-28 16:08:47 -08:00
parent a495432d40
commit 71619bee95
3 changed files with 12 additions and 2 deletions
+5 -1
View File
@@ -93,7 +93,11 @@ documents.onDidChangeContent((change) => {
async function validateTextDocument(textDocument: TextDocument): Promise<void> {
const result = await validate(
textDocument,
valueProviders(sessionToken, repoWorkspaceMap)
valueProviders(
sessionToken,
repos.find((repo) => textDocument.uri.startsWith(repo.workspaceUri)),
cache
)
);
connection.sendDiagnostics({ uri: textDocument.uri, diagnostics: result });