Cursor is a very popular fork of VSCode, switched to the OpenVSX marketplace. As a result, the PlatformIO extension is not available. A clone of this extension is available, but it worked unstably. Is the PlatformIO team going to publish the extension to the OpenVSX marketplace?
Duplicate of
You donāt need a clone of this extension, you can download .vsix file of the original extension and install it.
But I agree that presence in OpenVSX marketplace would make things easier.
But PlatformIO depends on Microsoft C/C++, is that available in OpenVSX? I thought Microsoft restricted the Microsoft C/C++ extension exactly only to the official VSCode and forbade it in the forks.
You are right. MS C/C++ extension is prohibited for non VS code. Sure, I can download it as VSIX also and install (sure, you violate a MS permission), but it doesnāt work with Cursor, at least v.1.5.5+. This version requires own Anysphere C/C++ or Clangd. Both are conflicted with MS C/C++
And I canāt make a working version. Iām using clone of Platformio + Clangd. Unfortunately, the Clang doesnāt fully compatible with platformio and requires some manual justification for include path every time, when I add a new library.
The last version of MS C/C++ extension to work with Cursor is 1.23.6.
Unfortunately, no. I make a clean setup of Cursor (1.5.5) in the system. After that, I installed c/c++ 1.23.6, and I got an error: Incompatible or Mismatched C/C++ Extension Binaries
The C/C++ extension includes native binaries.
When installed via the marketplace UI in VS Code, the correct native binaries should be included. If incompatible binaries were detected and the C/C++ extension had been installed via the marketplace UI in VS Code, please report the issue.
This is weird, I have Cursor 1.5.9 and C/C++ Extension 1.23.6 and no errors. The difference is that Iāve imported the extension from VS Code, and also Cursor installation survived multiple upgrades from 0.xx versions.
Iām sorry, I understand my response is not helpful. The issue seems to be dependent on more subtle conditions than version numbers⦠Is your system ARM-based by any chance? Mine is conventional x64.
I tried to replay your configuration. Windows 10 x64. Install the latest VS Code from scratch. Install C/C++ 1.23.6 here and⦠I have got the same error for VSCode! It seems like some āfuseā was inserted in the c/c++ extension. It can be successfully installed years ago, and canāt be installed right now
In fact, I worked with similar conditions - installing Cursor 0.x.x year ago, installing the latest for that moment c/c++ and PlatformIO IDE year ago, and successfully used this configuration with automatic updates until last week. Something happens one day, and Cursor canāt run. I decide to reinstall it. It was fatal. I canāt restore a working configuration. So, keep your configuration and try to avoid any updates or reinstallation.
Iām not sure whatās going on. I also have VS Code installation, so I rolled back the extension version to 1.23.6 there and got no error.
Then I updated the extension to its latest version (1.26.3), downloaded 1.23.6 VSIX file (SHA1: 7f2d6eb77d380f799bf16b0176e415d91fab01f5, SHA256: 6fcaa2c924ab08f1c492fa0bf40e630719052f717fbd474a3b233cb1bbe8362d) and reinstalled it. Still no error. Could you try downloading it as VSIX file and verifying its SHA1?
The direct download link is: marketplace.visualstudio.com/_apis/public/gallery/publishers/ms-vscode/vsextensions/cpptools/1.23.6/vspackage?targetPlatform=win32-x64
I even removed C/C++ and PlatformIO extensions from VS Code and reinstalled them, C/C++ from VSIX file and PlatformIO from Marketplace, but couldnāt bring up that error about incompatible binaries.
Thanks a lot. I download a wrong c++ extension. It works with file you pointed to.
Does PlatformIO extension now also work for you in Cursor?
Yes. I have installed the āoriginalā PlatformIO extension from the VSIX file and it working well. But any cases, it is a workaround. The PlatformIO team should think about adaptation to the VSCode forks and OpenVSI marketplace
I think some work is going on in https://github.com/platformio/platformio-vscode-ide/issues/1802#issuecomment-3194540743.
Yep. The publishing of Platformio on OpenVSI is not a big deal (fork of Platformio from davidgomes is working well, and I can build and upload projects). But the problem with Clangd. It has a problem getting the include path for some ānon-standardā compilers (see
> Clang issue. The same problem with xtensa compiler. As a result, the Intellisense failed āfile not found āstdio.hāā and almost all include files. Sure, the workaround exists, and I can add these includes manually to the .clang. But you should repeat these manual operations whenever an external library is added to the project. It is annoying. We should wait until the clangd team fixes it. (or should use another intellisense engine)
Okay. So sounds like when theyāre generating the compile_commands.json through PlatformIO, theyāre forgetting to set the COMPILATIONDB_INCLUDE_TOOLCHAIN environment variable that will cause the generated JSON file to also have the builtin compiler include paths (docs).