@Pert: 1000 thanks for the useful indications, now i have a lot to work on!
You are right, i have downloaded the Arduino-CLI and started using it without uninstalling my Arduino IDE, so the CLI found the boards and the libraries automatically. I will look at the configuration options you pointed me to in order to understand them better.
I also came across the PRO version of the IDE, i got curious, downloaded it and gave it a look: surprisingly, the PRO IDE didn't find the normal IDE folders. If i get this one to work the way i want, it will save me from the hassle of studying how to set up VS Code instead. Wow!