Is there a way to edit and render markdown or any other structured text format and math formulas in C++ code inside VS Code? I want to edit and view text and formulas inside VS Code editor, so there is no need for an external tool to view them in their target format. I know about some support for Doxygen comments, which are rendered in the tooltip, but it's limited and doesn't cover rendering of math formulas inside VS Code.
EDIT
In response to suggestion of having this question closed as redundant to How can I mix LaTeX in with Markdown?. My question is concerned with markdown or any other structured text format and math formulas in C++ code (see above), which is different from editing a pure markdown (*.md) file.
EDIT
In response to comments that my question is still not clear: markdown or any other structured text format and math formulas in C++ code means exactly that. The usual way markdown text is mixed into C++ are specially marked comments, but I'm not limiting my question to that. I would accept illegal C++ syntax, if it is preprocessed into legal C++ code by the build task.
For example, *.cpp file would contain these lines:
// $f(x) = \frac{2 \pi}{x}$
float f(x);
which would be displayed in VS Code editor as: