mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-06-04 03:06:32 +00:00
This commit is contained in:
parent
db48ed616b
commit
852bf9b73e
@ -288,10 +288,11 @@ export class ArduinoFrontendContribution implements FrontendApplicationContribut
|
||||
}
|
||||
}
|
||||
const { clangdUri, cliUri, lsUri } = await this.executableService.list();
|
||||
const [clangdPath, cliPath, lsPath] = await Promise.all([
|
||||
const [clangdPath, cliPath, lsPath, cliConfigPath] = await Promise.all([
|
||||
this.fileService.fsPath(new URI(clangdUri)),
|
||||
this.fileService.fsPath(new URI(cliUri)),
|
||||
this.fileService.fsPath(new URI(lsUri)),
|
||||
this.fileService.fsPath(new URI(await this.configService.getCliConfigFileUri()))
|
||||
]);
|
||||
this.languageServerFqbn = await Promise.race([
|
||||
new Promise<undefined>((_, reject) => setTimeout(() => reject(new Error(`Timeout after ${20_000} ms.`)), 20_000)),
|
||||
@ -300,6 +301,7 @@ export class ArduinoFrontendContribution implements FrontendApplicationContribut
|
||||
cliPath,
|
||||
clangdPath,
|
||||
log: currentSketchPath ? currentSketchPath : log,
|
||||
cliConfigPath,
|
||||
board: {
|
||||
fqbn,
|
||||
name: name ? `"${name}"` : undefined
|
||||
|
@ -2,6 +2,7 @@ export const ConfigServicePath = '/services/config-service';
|
||||
export const ConfigService = Symbol('ConfigService');
|
||||
export interface ConfigService {
|
||||
getVersion(): Promise<Readonly<{ version: string, commit: string, status?: string }>>;
|
||||
getCliConfigFileUri(): Promise<string>;
|
||||
getConfiguration(): Promise<Config>;
|
||||
setConfiguration(config: Config): Promise<void>;
|
||||
isInDataDir(uri: string): Promise<boolean>;
|
||||
|
Loading…
x
Reference in New Issue
Block a user