I’m finally attempting to make the transition from the Arduino IDE to PlatformIO IDE and, aside from a few peculiarities that I’ve yet to sort out, I’m liking it quite a lot. One thing that I can foresee being a big pain in the future, however, is the way libraries are added to a project. In the Arduino IDE, you simply download the library into the libraries folder and add #include <library.h> to the top of the script. PlatformIO, on the other hand, seems to be purely on an individual project basis, requiring you to install the library for each project that uses it, which is fine, if a bit annoying. To install the library, I go to PlatformIO>QUICK ACCESS>PIO Home>Libraries, search for the library, hit Add to Project, scroll until I find my current project, and hit add. There are two situations where I can see this process being an issue.
One, if I have Project A which uses a lot of libraries and I want to make a new project, B, that uses the same libraries, I have to go search for and install those libraries all over again. Not that terrible, but it seems really inefficient, coming from the Arduino IDE version where you just copy-paste the #include section of project A into project B and you’re good to go.
Two, and more of a concern for me, is that you have to scroll through all your projects and find the one you want to add the library to. That’s fine if you only have a couple dozen total projects, but my Arduino projects have gotten into the hundreds over the years, and I know my PlatformIO projects will get there pretty quickly. Scrolling through 200 projects to find the one I’m working on is going to be a massive pain, especially if I have combine that with concern one I mentioned earlier. Is it possible to just add the library to the current project, instead of scrolling through until you find the current project?
So my question is, am I doing this right or missing something and shooting myself in the foot doing it this way? If this is the normal way to do things, how do you manage having to install the same dozen libraries multiple times? And how do you manage having to scroll through dozens or hundreds of projects to find the one that’s open?
I’m sure these have been addressed before, but I couldn’t find anything particularly concrete in my searching.
PS. please be nice, I’m fairly new to VScode and brand new to PlatformIO. I’ve been working with the Arduino IDE for the better part of a decade so switching IDEs is taking some getting used to.