#1207: Forward the realTimeDiagnostics to the LS.

Closes #1207.

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
Akos Kitta 2022-07-18 16:02:06 +02:00 committed by Akos Kitta
parent 8ad10b5adf
commit d4833affc6

View File

@ -107,6 +107,9 @@ export class InoLanguage extends SketchContribution {
} }
this.logger.info(`Starting language server: ${fqbn}`); this.logger.info(`Starting language server: ${fqbn}`);
const log = this.preferences.get('arduino.language.log'); const log = this.preferences.get('arduino.language.log');
const realTimeDiagnostics = this.preferences.get(
'arduino.language.realTimeDiagnostics'
);
let currentSketchPath: string | undefined = undefined; let currentSketchPath: string | undefined = undefined;
if (log) { if (log) {
const currentSketch = await this.sketchServiceClient.currentSketch(); const currentSketch = await this.sketchServiceClient.currentSketch();
@ -141,6 +144,7 @@ export class InoLanguage extends SketchContribution {
fqbn, fqbn,
name: name ? `"${name}"` : undefined, name: name ? `"${name}"` : undefined,
}, },
realTimeDiagnostics,
} }
), ),
]); ]);