mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-06-11 22:56:33 +00:00
Added command line argument for specifying cli path
This commit is contained in:
parent
60bf58ac0f
commit
ec6b5ed3f3
@ -23,13 +23,14 @@ export class ArduinoLanguageServerContribution extends BaseLanguageServerContrib
|
|||||||
}
|
}
|
||||||
|
|
||||||
async start(clientConnection: IConnection): Promise<void> {
|
async start(clientConnection: IConnection): Promise<void> {
|
||||||
const clangd = await this.resolveExecutable('clangd')
|
const clangd = await this.resolveExecutable('clangd');
|
||||||
const languageServer = await this.resolveExecutable('arduino-language-server')
|
const languageServer = await this.resolveExecutable('arduino-language-server');
|
||||||
|
const cli = await this.resolveExecutable('arduino-cli');
|
||||||
// Add '-log' argument to enable logging to files
|
// Add '-log' argument to enable logging to files
|
||||||
const args: string[] = ['-clangd', clangd]
|
const args: string[] = ['-clangd', clangd, '-cli', cli];
|
||||||
console.log(`Starting language server ${languageServer} ${args.join(' ')}`)
|
console.log(`Starting language server ${languageServer} ${args.join(' ')}`);
|
||||||
const serverConnection = await this.createProcessStreamConnectionAsync(languageServer, args)
|
const serverConnection = await this.createProcessStreamConnectionAsync(languageServer, args);
|
||||||
this.forward(clientConnection, serverConnection)
|
this.forward(clientConnection, serverConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected resolveExecutable(name: string): Promise<string> {
|
protected resolveExecutable(name: string): Promise<string> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user