@@ -10,8 +10,8 @@ import { LanguageClient, CloseAction, ErrorAction, InitializeError, Message, Rev
10
10
11
11
interface LanguageServerConfig {
12
12
readonly lsPath : string ;
13
- readonly cliPath : string ;
14
- readonly cliConfigPath : string ;
13
+ readonly cliDaemonAddr : string ;
14
+ readonly cliDaemonInstance : string ;
15
15
readonly clangdPath : string ;
16
16
readonly board : {
17
17
readonly fqbn : string ;
@@ -29,7 +29,7 @@ interface LanguageServerConfig {
29
29
}
30
30
31
31
interface DebugConfig {
32
- readonly cliPath : string ;
32
+ readonly cliDaemonAddr : string ;
33
33
readonly board : {
34
34
readonly fqbn : string ;
35
35
readonly name ?: string ;
@@ -103,7 +103,7 @@ async function startDebug(_: ExtensionContext, config: DebugConfig): Promise<boo
103
103
let rawStdErr : string | undefined = undefined ;
104
104
try {
105
105
const args = [ 'debug' , '-I' , '-b' , config . board . fqbn , config . sketchPath , '--format' , 'json' ] ;
106
- const { stdout, stderr } = spawnSync ( config . cliPath , args , { encoding : 'utf8' } ) ;
106
+ const { stdout, stderr } = spawnSync ( config . cliDaemonAddr , args , { encoding : 'utf8' } ) ;
107
107
rawStdout = stdout . trim ( ) ;
108
108
rawStdErr = stderr . trim ( ) ;
109
109
} catch ( err ) {
@@ -188,8 +188,8 @@ async function startLanguageServer(context: ExtensionContext, config: LanguageSe
188
188
}
189
189
190
190
async function buildLanguageClient ( config : LanguageServerConfig ) : Promise < LanguageClient > {
191
- const { lsPath : command , clangdPath, cliPath , cliConfigPath , board, flags, env, log } = config ;
192
- const args = [ '-clangd' , clangdPath , '-cli' , cliPath , '-cli-config ' , cliConfigPath , '-fqbn' , board . fqbn ] ;
191
+ const { lsPath : command , clangdPath, cliDaemonAddr , cliDaemonInstance , board, flags, env, log } = config ;
192
+ const args = [ '-clangd' , clangdPath , '-cli-daemon-addr ' , cliDaemonAddr , '-cli-daemon-instance ' , cliDaemonInstance , '-fqbn' , board . fqbn ] ;
193
193
if ( board . name ) {
194
194
args . push ( '-board-name' , board . name ) ;
195
195
}
0 commit comments