From e4ba51aea3f1d62142a16cbb2c96f8a279d30f52 Mon Sep 17 00:00:00 2001 From: Riatre Foo Date: Sun, 14 Oct 2018 07:58:08 +0800 Subject: [PATCH] textDocument/signatureHelp: enable documentation --- src/messages/textDocument_signatureHelp.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/messages/textDocument_signatureHelp.cc b/src/messages/textDocument_signatureHelp.cc index 420ec164..419bdbe8 100644 --- a/src/messages/textDocument_signatureHelp.cc +++ b/src/messages/textDocument_signatureHelp.cc @@ -103,10 +103,8 @@ public: const char *ret_type = nullptr; SignatureInformation &ls_sig = ls_sighelp.signatures.emplace_back(); -#if LLVM_VERSION_MAJOR >= 8 const RawComment *RC = getCompletionComment(S.getASTContext(), Cand.getFunction()); ls_sig.documentation = RC ? RC->getBriefText(S.getASTContext()) : ""; -#endif for (const auto &Chunk : *CCS) switch (Chunk.Kind) { case CodeCompletionString::CK_ResultType: @@ -183,7 +181,7 @@ void MessageHandler::textDocument_signatureHelp( CodeCompleteOptions CCOpts; CCOpts.IncludeGlobals = false; CCOpts.IncludeMacros = false; - CCOpts.IncludeBriefComments = false; + CCOpts.IncludeBriefComments = true; if (cache.IsCacheValid(path, begin_pos)) { SignatureHelpConsumer Consumer(CCOpts, true); cache.WithLock([&]() { Consumer.ls_sighelp = cache.result; });