Skip to content

Commit bc79c39

Browse files
committed
fix
1 parent b3f4913 commit bc79c39

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/utils/suggest-aderyn-init.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,14 @@ async function suggestAderynTomlIfProjectIsNested() {
2525
vscode.commands
2626
.executeCommand(EditorCmd.InitConfigFile)
2727
.then(async () => {
28-
// Try to restart the diagnostics server now if the `root` value is not `.`
29-
if (
30-
await aderynTomlAtWorkspaceRootHasNonDefaultRootValue()
31-
) {
32-
// TODO: test this part
33-
await autoStartLspClientIfRequested(true);
34-
}
28+
setTimeout(async () => {
29+
// Try to restart the diagnostics server now if the `root` value is not `.`
30+
if (
31+
await aderynTomlAtWorkspaceRootHasNonDefaultRootValue()
32+
) {
33+
await autoStartLspClientIfRequested(true);
34+
}
35+
}, 1000); // Assumption: After 1 second, executeCommand(EditorCmd.InitConfigFile) finishes.
3536
});
3637
}
3738
});

0 commit comments

Comments
 (0)