Skip to content

Commit 1526161

Browse files
committed
on open handling
1 parent e428728 commit 1526161

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/extension.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ export function activate(context: ExtensionContext) {
3434
}
3535
}
3636
}),
37+
workspace.onDidOpenTextDocument(async (document) => {
38+
if (enabledLanguages.includes(document.languageId)) {
39+
const validation = getAutoValidation(document);
40+
if (validation === AutoValidation.ALWAYS) {
41+
validations.set(document.uri, await provider.validate(document));
42+
}
43+
}
44+
}),
3745
workspace.onDidChangeTextDocument(async (event) => {
3846
const document = event.document;
3947
if (enabledLanguages.includes(document.languageId)) {

0 commit comments

Comments
 (0)