Skip to content

Commit

Permalink
Wait for language client to be ready
Browse files Browse the repository at this point in the history
  • Loading branch information
petervdonovan committed May 22, 2024
1 parent b33e181 commit b0bf81e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/build_commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ const getWorkspace =
const roots = vscode.workspace.workspaceFolders;
let lf_files: vscode.Uri[] = [];
let lingo_tomls: vscode.Uri[] = [];
vscode.window.showInformationMessage("roots: " + JSON.stringify(lf_files));
if (roots) {
for (const root of roots) {
const files: vscode.Uri[] = await vscode.workspace.findFiles(
Expand All @@ -65,13 +64,10 @@ const getWorkspace =
}
lf_files.sort((a, b) => a.fsPath.localeCompare(b.fsPath));
lingo_tomls.sort((a, b) => a.fsPath.localeCompare(b.fsPath));
vscode.window.showInformationMessage("lf_files: " + JSON.stringify(lf_files));
vscode.window.showInformationMessage("lingo_tomls: " + JSON.stringify(lingo_tomls));
let lf_asts = [];
for (const lf_file of lf_files) {
vscode.window.showInformationMessage("getting ast for " + lf_file.toString());
const ast = await client.sendRequest("parser/ast", lf_file.toString());
vscode.window.showInformationMessage("got ast");
await client.onReady();
const ast = await client.sendRequest("parser/ast", lf_file.fsPath);
vscode.window.showInformationMessage("ast: " + JSON.stringify(ast));
lf_asts.push(ast);
}
Expand Down

0 comments on commit b0bf81e

Please sign in to comment.