20Tauri / DoxyDoxygen

The last word in code documentation generation
140 stars 5 forks source link

[C++] preferred_comments_styles: better docs? #159

Open rwols opened 3 years ago

rwols commented 3 years ago

Ironically I don't understand how preferred_comments_styles works precisely...

  1. What does the ordering do? If I put /// higher it seems to prefer that.
  2. Each entry seems to be a list of strings or more lists. What does each entry do exactly?

What I want to achieve is this kind of comment style:


/// First line is implicit brief, I don't want an explicit \brief
///
/// Optional detail paragraph.
///
/// \param bar   does bar
/// \param baz   does baz
/// \param qux   does qux
/// \return something, no empty docline between \param and \return
float foo(int bar, int baz, int qux);

I did discover that "doxygen_command_prefix": "\\", does what I want with respect to \param vs @param.

rwols commented 3 years ago

By the way, consider adding a sublime-package.json file that describes the settings with a schema for LSP-json: https://github.com/sublimelsp/LSP-json#schemas-contributed-by-packages

20Tauri commented 3 years ago

Thank you for the suggestion

The settings section of the documentation explains the format (expand the settings for more details) It's not easy to understand, because the format have changed from the initial version and the compatibility has been preserved. Feel free to ask more specific questions or suggest a better explanation if the documentation is not clear.

To answer your example, the settings could start like this

    "preferred_comments_styles": [
       [
           [ "/// " ],
           [ "/// " ],
       ],