feat: decouple intellisense extension dependency#4463
Conversation
Note : IntelliSense Data Generation & Clangd ParityWhile this PR prevents Currently, when the extension rebuilds the project index upon a As a result, a user utilizing the newly enabled Clangd workflow must manually generate their compilation database by running: pio run -t compiledbWhat was consideredI considered injecting a workaround into Full Parity RoadmapTo achieve full "first-class" parity for Clangd out of the box, the ideal approach would be an upstream modification to Since that requires changes in the core Python repository rather than the VS Code extension, I've left it out of scope for this immediate architectural decoupling PR. Matt |
TL:DR: Decouples hardcoded extension ID lookups and implements a soft-dependency facade for IntelliSense engines to allow activation in open-source editors, and other platforms like Google Antigravity, that do not use the Microsoft restricted marketplace (e.g. instead use Open VSX).
Rationale
Historically, PlatformIO's VS Code extension relied on hardcoded identifier lookups (
platformio.platformio-ide) and aggressive conflict management, which assumes a very standard Microsoft VS Code environment.As developers increasingly migrate toward authorized open-source IDE variants and AI-agentic editors (such as Google's Antigravity IDE, Cursor, and VSCodium), these hardcoded assumptions either crash the extension or prevent fundamental features (like IntelliSense) from hooking into the workspace correctly.
This PR modernizes the extension’s architecture by decoupling it from strict environmental assumptions, converting rigid extension ID checks into a soft-dependency facade. This allows PlatformIO to organically activate and fully function inside non-standard VS Code forks without negatively impacting the native Microsoft VS Code experience.
Changes Included
src/main.js&src/utils.js):Removed hardcoded references to
platformio.platformio-ide. IDE manifest fetches now safely failover if called prior to the context injection step, preventing uncaught initialization crashes in alternative editors.src/constants.js):Registered
ms-vscode.cpptoolsandllvm-vs-code-extensions.vscode-clangddynamically.src/constants.js&src/misc.js):Removed
vscode-clangdfrom theCONFLICTED_EXTENSION_IDSarray so it is no longer forcibly uninstalled/disabled.src/misc.js):Implemented the
warnMissingIntelliSenseEngine()routine to detect whether the user lacks an installed C/C++ engine, and prompts an optional, dismissible warning to install one, restoring choice to the user ecosystem.Related Changes
FR: Official Support for Google Antigravity IDE #4417
platformio-node-helpers #24
fix: enforce strict python baseline < 3.13