Templates interface files

I do not know if templates is the right topic and I assume it may be more a VSC thing, but there I did not find what I look for.

I have some code I use often, i.e. a sensor handling oder LCD handling. my say they are a kind of interface modules. So i.e. I have a module for the DHT22 and for the BME2080 etc, in these module I have standard functions i.e

void sonsorSetup()
   here_the_setup_function();   // call the setup from the use library

So I can write in main() just sensorSetup() and it works, if I use an other sensor I just have to change the use library in platform.ini and include the the corresponding header file from my interface. May not be the best parctice but it works fine for me.

Till now I export these th external textfile by ctrlvc and ctrl-v.

But I thing that shout be possible internaly and so haveing easier access to these “Interface files” in any new project.

need help or hint