Skip to content

Conversation

tcottin
Copy link
Contributor

@tcottin tcottin commented Sep 1, 2025

PR for some followup issues from clangd/clangd#529.

\note and \warning:
In the hover card, they are now displayed with heading and enclosing rulers.

\retval commands:
Each \retval command is now a bullet point under the return section of the hover card.

Change arguments of doxygen commands to be rendered as monospaced
@Stehsaer
Copy link

Stehsaer commented Sep 2, 2025

It's working great as intended!
image
Can other commands like @details be added the same way we add paragraphs for @note and @warning?

Update: Yes we can, just add some more changes as given below. This should work well for "generic" ones that only needs a Header and its content to be shown. Compiled and tested it out, working quite well.

diff --git a/clang-tools-extra/clangd/SymbolDocumentation.cpp b/clang-tools-extra/clangd/SymbolDocumentation.cpp
index 86bd6162b..1638e4b55 100644
--- a/clang-tools-extra/clangd/SymbolDocumentation.cpp
+++ b/clang-tools-extra/clangd/SymbolDocumentation.cpp
@@ -216,6 +216,7 @@ public:
       break;
     case comments::CommandTraits::KCI_note:
     case comments::CommandTraits::KCI_warning:
+    case comments::CommandTraits::KCI_details:
       commandToHeadedParagraph(B);
       break;
     case comments::CommandTraits::KCI_retval: {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants