Multiple templates for one extension?
I am working on a project and write with PHP code different extensions/plugins for it. Thus, each plugin should have a different header comment. Please add an option for template name, so we can have a number of templates for the same file extension and choose which one to insert.
I don't want to require users to select different templates when they want to save a file (which would also have to affect every save where parts of the header can be modified on each save). However, it might be possible to solve this a different way - say through the presence of a specific file in the project directory (maybe even part of package.json) that includes the comment (or indeed any project specific property value) to be inserted for all files within that project. There is already a precedent for this in the extension for getting the project name from package.json.
I will take a look at what is feasible.
In my case, I am talking about a project inside a project. My workspace needs to be in the general folder of the code, while the projects I am working on, and that needs a different header, are in subfolders. Yes, I can create a VSCode workspace in the subfolder for each project(plugin), but in this case, I am missing autocomplete and check for class existence that resides in the main project. Plus, inteliphence also complains about undefined functions etc. However, any option to solve this and have multiple templates will be a good addon. There are other plugins, that have the ability to set template name and choose upon insert, but they lack the option for "last modified time" which is important for some projects.
I am re-opening this to keep track of adding the suggested enhancement from my previous message.
Your comment about lack of last modified in other options is the key to why this extension works differently and decided by file type. To use different templates for the same file type would require something to be embedded into the header to identify which template to use for updates - and that is not desirable.
The bit that may not have been explained very well in my last message is that the suggested new config file(s) can live anywhere and the extension will use the file closest to the source file - so each time a save happens the extension will search for a file in the same directory and work its way up the file hierarchy until it finds one. So you could have a config file within each sub-project branch with its own values which would achieve what you originally asked for.
That will be perfect. And very neat and simple solution BTW.