diff options
Diffstat (limited to 'clang-tools-extra/clangd/ConfigCompile.cpp')
-rw-r--r-- | clang-tools-extra/clangd/ConfigCompile.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/ConfigCompile.cpp b/clang-tools-extra/clangd/ConfigCompile.cpp index 35d35f7..5dda6dd 100644 --- a/clang-tools-extra/clangd/ConfigCompile.cpp +++ b/clang-tools-extra/clangd/ConfigCompile.cpp @@ -198,6 +198,7 @@ struct FragmentCompiler { compile(std::move(F.InlayHints)); compile(std::move(F.SemanticTokens)); compile(std::move(F.Style)); + compile(std::move(F.Documentation)); } void compile(Fragment::IfBlock &&F) { @@ -793,6 +794,21 @@ struct FragmentCompiler { } } + void compile(Fragment::DocumentationBlock &&F) { + if (F.CommentFormat) { + if (auto Val = + compileEnum<Config::CommentFormatPolicy>("CommentFormat", + *F.CommentFormat) + .map("Plaintext", Config::CommentFormatPolicy::PlainText) + .map("Markdown", Config::CommentFormatPolicy::Markdown) + .map("Doxygen", Config::CommentFormatPolicy::Doxygen) + .value()) + Out.Apply.push_back([Val](const Params &, Config &C) { + C.Documentation.CommentFormat = *Val; + }); + } + } + constexpr static llvm::SourceMgr::DiagKind Error = llvm::SourceMgr::DK_Error; constexpr static llvm::SourceMgr::DiagKind Warning = llvm::SourceMgr::DK_Warning; |