Using Existing Arduino libraries in place

Hello pfeerick,
Yes, I’m familiar with lib_extra_dirs in platformio.ini. My problem seems a bit more complicated…an example might help describe it…

A simple program with the line #include <Keyboard.h> compiles fine in Arduino’s IDE.

Move that same program to Platformio/vscode, and now I have several “can’t find Keyboard.h, etc…”. So I track down Keyboard.h’s library in the Arduino’s libraries, and include that in platformio’s lib_extra_dirs.

Now I have all type of “can’t find hid.h” missing files. So I manually track those down and do the same, adding the libraries to lib_extra_dirs again.

Then I have many "can’t find pluggableusb.h references and others…this process seems endless, and Arduino’s libraries are is several different places (Base, core, hardware, platform, etc?).

Ideally, there would be one single lib_extra_dirs that I could add at the root of my arduino installation that would solve this in platformio, but including the base of my arduino like that didn’t seem to help.

Alternately, a manner in platformio of “listing” every reference that is missing, but I suspect that that is impossible since if it can’t find a file, it cannot look into that file to see what is missing further up the hierarchy of prerequisites.
…or is there some better method of doing this messy process that what I am doing? In the future I’d like to keep all these third-party located libraries within my project to keep it portable, but I can’t seem to find a good method of tracking and finding them. Any other suggestions?