Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b9f370a

Browse filesBrowse files
committed
update Language Server flags
1 parent 4525813 commit b9f370a
Copy full SHA for b9f370a

File tree

1 file changed

+6
-6
lines changed
Filter options

1 file changed

+6
-6
lines changed

‎src/extension.ts

Copy file name to clipboardExpand all lines: src/extension.ts
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import { LanguageClient, CloseAction, ErrorAction, InitializeError, Message, Rev
1010

1111
interface LanguageServerConfig {
1212
readonly lsPath: string;
13-
readonly cliPath: string;
14-
readonly cliConfigPath: string;
13+
readonly cliDaemonAddr: string;
14+
readonly cliDaemonInstance: string;
1515
readonly clangdPath: string;
1616
readonly board: {
1717
readonly fqbn: string;
@@ -29,7 +29,7 @@ interface LanguageServerConfig {
2929
}
3030

3131
interface DebugConfig {
32-
readonly cliPath: string;
32+
readonly cliDaemonAddr: string;
3333
readonly board: {
3434
readonly fqbn: string;
3535
readonly name?: string;
@@ -103,7 +103,7 @@ async function startDebug(_: ExtensionContext, config: DebugConfig): Promise<boo
103103
let rawStdErr: string | undefined = undefined;
104104
try {
105105
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' });
107107
rawStdout = stdout.trim();
108108
rawStdErr = stderr.trim();
109109
} catch (err) {
@@ -188,8 +188,8 @@ async function startLanguageServer(context: ExtensionContext, config: LanguageSe
188188
}
189189

190190
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];
193193
if (board.name) {
194194
args.push('-board-name', board.name);
195195
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.