[clang-tools-extra] [clangd] Improve Markup Rendering (PR #140498)
Maksim Ivanov via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 11 06:33:33 PDT 2025
================
@@ -118,8 +138,8 @@ class Document {
BulletList &addBulletList();
/// Doesn't contain any trailing newlines.
- /// We try to make the markdown human-readable, e.g. avoid extra escaping.
- /// At least one client (coc.nvim) displays the markdown verbatim!
----------------
emaxx-google wrote:
Yes I was thinking at autodetection based on comment kinds. However looking at Headerdoc and QDoc which use the same `/*!` syntax as the one recognized by Doxygen, I suppose we'd end up regressing in some cases. Distinguishing based on presence of Doxygen `\` commands also won't help rendering Markdown-only comments.
So seems like the new Doxygen/Markdown logic should be guarded by a config option - something like `CommentFormat: Doxygen/Markdown/Plaintext` where `Plaintext` is the default that enables escaping?
> Note: this patch is the first one to support parsing of doxygen style comments and showing the parsed documentation as markdown in the hover.
I understand and I agree this is a valuable contribution long awaited by the community - thanks for tackling this. Willing to help finding a reasonable path forward for this chain of PRs, without introducing problems for existing projects.
https://github.com/llvm/llvm-project/pull/140498
More information about the cfe-commits
mailing list