Intellisense is no longer understanding scoping within includes

I have been using PlatformIO for Arduino (ESP32/8266) for a few years, I’m likely not doing things correctly (through ignorance), but I’ve fumbled around and “things” have worked very well for me. In most projects I have a main.cpp that has a #include file in it that holds many common routines that rely on items defined in the main.cpp (defined prior to the #include). Before several upgrades in December, Intellisense would understand the scoping of the include file (it would not flag items defined in the main.cpp, nor exclude items based in ‘#if defined’ in the main).

The common include file is saved in the PlatformIO directory, and this is in the platformio.ini file:

build_flags = -I “${platformio.workspace_dir}/…/…/…/”

The compiler correctly finds the common files in the correct location. Intellisense knows they are there (I believe) because a right-click “Go to Definition” takes you there. But the error flagging, and variable recognition does not work.

Again, it compiles correctly, but editing the common include has become extremely distracting since so many items are defined in the main that are not being recognized. Is there a Intellisense setting or something?

Yes, I’m sure there are more professional ways of architecting this, but this is where I am, and it was working great.

Thank you.

Never mind, I just restructured it into libs (vs. includes)