20Tauri/DoxyDoxygen

[C++] preferred_comments_styles: better docs?

rwols opened this issue · 2 comments

rwols commented

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

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

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": [
       [
           [ "/// " ],
           [ "/// " ],
       ],