Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit 7039ea8

Browse files
elektronikworkshopadiazulay
authored andcommitted
IntelliSense auto gen respected global and project specific dis-/enable flags for analyze only. Now these flags have the same effect during regular builds.
1 parent deaa18a commit 7039ea8

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

src/arduino/arduino.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,9 @@ export class ArduinoApp {
373373
}
374374
}
375375
const stdoutcb = (line: string) => {
376-
cocopa.callback(line);
376+
if (cocopa.callback) {
377+
cocopa.callback(line);
378+
}
377379
if (verbose) {
378380
arduinoChannel.channel.append(line);
379381
}

src/arduino/intellisense.ts

+11
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,17 @@ export function isCompilerParserEnabled(dc?: DeviceContext) {
5656
*/
5757
export function makeCompilerParserContext(dc: DeviceContext): ICoCoPaContext {
5858

59+
// TODO: callback for local setting: when IG gen is re-enabled file
60+
// analysis trigger. Perhaps for global possible as well?
61+
if (!isCompilerParserEnabled(dc)) {
62+
return {
63+
callback: undefined,
64+
conclude: async () => {
65+
arduinoChannel.info("IntelliSense auto-configuration disabled.");
66+
},
67+
};
68+
}
69+
5970
const engines = makeCompilerParserEngines(dc);
6071
const runner = new ccp.Runner(engines);
6172

0 commit comments

Comments
 (0)