diff --git a/src/LSPHackTypeChecker.ts b/src/LSPHackTypeChecker.ts index e9701eb..c6f6a57 100644 --- a/src/LSPHackTypeChecker.ts +++ b/src/LSPHackTypeChecker.ts @@ -46,6 +46,8 @@ export class LSPHackTypeChecker { }), ); + // `hh_client --lsp` fails to spawn `hh_server` if not already running, + // so do an initial `hh_client` call to start the server if needed. await vscode.window.withProgress( { location: vscode.ProgressLocation.Window, diff --git a/src/proxy.ts b/src/proxy.ts index 6bfdcbd..469b465 100755 --- a/src/proxy.ts +++ b/src/proxy.ts @@ -19,11 +19,14 @@ export async function version( } } +/** Run `hh_client` to start `hh_server` if needed. */ export async function start( config: HackConfig, log: vscode.LogOutputChannel, ): Promise { - return run(config, log, []); + // Ignore errors to avoid exceeding `maxBuffer` in case of many preexisting errors. + // We only run this command to ensure `hh_server` starts and don't care about the output. + return run(config, log, ["--max-errors", "0"]); } async function run(