How to doc the functions?

After the upgrade to IDE 2.0.0-rc9.1the Intellisense kind start to work.
It is great.
How should I declare the method headers?


I was using @brief, @param and @return, but the IDE did not recognized these keywords.

This is a subject I am also interested in. I did some research on it recently and was not able to find any proper documentation on the subject.

This "hover" content comes from the industry standard free open source clangd C++ language server, and the handling on the GUI side is also not from Arduino's bespoke code. So if you are researching the subject you should avoid limiting your searches with the "arduino" keyword.

Here is what I know:

  • Both C++ style (//) and C style (/**/) comments are recognized
  • The comment above a function declaration is used, regardless of how much whitespace separates it.
  • Inline comments are not recognized for function declarations, but they are for other objects (e.g., enumerators)
  • In some cases, line breaks in comments are ignored, in other cases they are preserved: llvm/llvm-project@b194e7d
  • The only markup I have found to be recognized is `inline code` . Even Markdown code fences (```) aren't working.
  • It seems there is no support for Doxygen markup: clangd/clangd#529

If anyone discovers more information, please do share it.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.