doxdocgen icon indicating copy to clipboard operation
doxdocgen copied to clipboard

Multiple templates

Open jankap opened this issue 5 years ago • 2 comments
trafficstars

Description

It would be awesome to have different templates for either different files (for example I'd like to use different doxygen comments in source and header files respectively). This could be implemented by multiple trigger sequences like /** [enter] for auto guessing and \*c [enter] for c files and so on.

Is that a big effort? Unfortunately, my TS skills are very limited.

jankap avatar Mar 24 '20 21:03 jankap

The information is available easily for the plugin. Problem with the user experience is that there may be confusion of which setting to use and they can easily get out of sync which may cause unexpected behavior.

I think a primary and a secondary setting may be manageable. An arbitrary number of config styles is not possible (due to how VS Code handles settings). One could the apply the primary or secondary style based on some regex or w/e.

What would you suggest?

cschlosser avatar Mar 26 '20 18:03 cschlosser

The only idea I have for unlimited templates is an additional json file where as many configs can be created as templates required. But I don't need that so far. For me, a template for a header and a template for a sources file would be sufficient.

What do you mean with w/e? I think a different trigger is sufficient, i.e. /**h for a header and /**c for source file. You could make the triggers configurable as well :)

jankap avatar Mar 27 '20 15:03 jankap