Skip to content

Commit

Permalink
on open handling
Browse files Browse the repository at this point in the history
  • Loading branch information
ecmel committed Jan 28, 2024
1 parent e428728 commit 1526161
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ export function activate(context: ExtensionContext) {
}
}
}),
workspace.onDidOpenTextDocument(async (document) => {
if (enabledLanguages.includes(document.languageId)) {
const validation = getAutoValidation(document);
if (validation === AutoValidation.ALWAYS) {
validations.set(document.uri, await provider.validate(document));
}
}
}),
workspace.onDidChangeTextDocument(async (event) => {
const document = event.document;
if (enabledLanguages.includes(document.languageId)) {
Expand Down

0 comments on commit 1526161

Please sign in to comment.