DocStringExtensions.jl icon indicating copy to clipboard operation
DocStringExtensions.jl copied to clipboard

Feature request: option to override template in specific case

Open tomerarnon opened this issue 1 year ago • 4 comments

Is it possible to override a set template for a particular docstring?

In particular, my template involves $TYPEDSIGNATURES, and in a couple of exceptional cases, I would rather omit those in favor of a more curated and brief list. Is it possible to do this?

tomerarnon avatar Oct 05 '23 01:10 tomerarnon

Not possible to do. The only solution I can think of at the moment would be to maybe use a submodule that doesn't have a template set and put the ones you don't want to have use it in there instead. Not tried it, but might work from what I recall.

MichaelHatherly avatar Oct 05 '23 07:10 MichaelHatherly

In that case, I'd like to make this a feature request to be able to override a template easily (e.g. with another abbreviation or something) 😅 Should I change the title to reflect or make a new issue and close this one?

tomerarnon avatar Oct 05 '23 19:10 tomerarnon

Yes, please adjust the title. Unsure how it could be implemented, but likely something that could exist in some form since I can see it's usefulness.

MichaelHatherly avatar Oct 05 '23 19:10 MichaelHatherly

Maybe a macro or a different abbreviation at the top can be used to ignore the template? I haven't looked into any DocStringExtension internals, so I can't suggest anything concrete...

tomerarnon avatar Oct 05 '23 21:10 tomerarnon