Hey!
Basically I just started to learn some embedded development and I started with the ESP32 and the PlatformIO extension. Anyway whenever I would create a new project through PlatformIO, in my main.cpp file for example I would always get all these warnings with IntelliSense, then I download the clangd extension which didn’t make it any better. Long story short I found a way to suppress the warnings or just fix them (with the clangd extension) and I put it into a wrapper when you go to create the new project.
I have no idea if something like this already exists or if it would be useful for anyone, mainly just did it for me since the squiggles were annoying to me.
If anyone else wanted to check it out and put it to use you can find it here GitHub Repo. If this happens to help some people out thats great!! and if you like it, a star on the repo would be much appreciated.
You’re not supposed to get Intellisense errors in a new project that builds cleanly in the first place. Are you using Microsoft VSCode + PlatformIO? Or VSCodium / OSS VSCode + Clangd? The PlatformIO extension is designed to work with Microsoft’s C/C++ extension, not clangd.
Originally it was VSCode and the PlatformIO extension without clangd enabled and I was still getting intellisense warnings despite the project building fine and working on the microcontroller. I think after I closed and reopened VSCode it suggested to download clangd instead which I did, but I was still getting errors, so I just asked AI to see if it could get rid of the intellisense warnings. Which it did do that and from there I just put it into that wrapper above.
I can’t reproduce that at all.
What Intellisense errors were you getting?
I honestly have no idea then. When you created the project do you just run “rio init –board ESP32dev“.
Correct. pio init -b esp32dev. VSCode will autogenerate the .vscode intellisense configuration automatically then, triggered by the PlatformIO VSCode extension. I only added @7.0.1 to force the usage of the latest official Espressif32 platform version instead of PIOArduino.
Guess I’ll experiment with it then, there is a chance that I did something wrong. Thanks for your input.