summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/CodeComplete.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clangd/CodeComplete.cpp')
-rw-r--r--clang-tools-extra/clangd/CodeComplete.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/clang-tools-extra/clangd/CodeComplete.cpp b/clang-tools-extra/clangd/CodeComplete.cpp
index 93588b49289..ee709021f9c 100644
--- a/clang-tools-extra/clangd/CodeComplete.cpp
+++ b/clang-tools-extra/clangd/CodeComplete.cpp
@@ -556,16 +556,19 @@ CompletionItem indexCompletionItem(const Symbol &Sym, llvm::StringRef Filter,
Item.kind = toCompletionItemKind(Sym.SymInfo.Kind);
Item.label = Sym.Name;
// FIXME(ioeric): support inserting/replacing scope qualifiers.
- Item.insertText = Sym.Name;
+
// FIXME(ioeric): support snippets.
+ Item.insertText = Sym.CompletionPlainInsertText;
Item.insertTextFormat = InsertTextFormat::PlainText;
Item.filterText = Sym.Name;
// FIXME(ioeric): sort symbols appropriately.
Item.sortText = "";
- // FIXME(ioeric): use more symbol information (e.g. documentation, label) to
- // populate the completion item.
+ if (Sym.Detail) {
+ Item.documentation = Sym.Detail->Documentation;
+ Item.detail = Sym.Detail->CompletionDetail;
+ }
return Item;
}
OpenPOWER on IntegriCloud