microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.
Other
5.41k stars 1.52k forks source link

Doxygen monospaced comments that preserve whitespace #9422

Open leidegre opened 2 years ago

leidegre commented 2 years ago

Feature Request

I don't know if this is something that Doxygen supports but I find it occasionally useful to have ASCII ART in my comments to act as a visual aid. This can be done with fenced markdown support as well, is there something you can do to just render something from a comment in a preformatted monospaced font? I've tried markdown (which I understand has been disabled) and HTML but it is also being ignored. I'm no expert on Doxygen maybe there's a simple workaround?

image

The above is rendered as below.

image

sean-mcmanus commented 2 years ago

The @code tag might be usable, but we'd have to add support for that. I don't know of another doxygen command to specify fixed width text (other than HTML support). See https://github.com/microsoft/vscode-cpptools/issues/8888 .

leidegre commented 2 years ago

I have absolutely no reservations about this, whatever is the simplest possible way to make something like this working would be perfectly fine with me.

Though, I really like that VS Code TypeScript + JSDoc comments support markdown it allows for some really rich documentation right there in the code that is very pleasant to read.