Skip to content

Commit

Permalink
Remove chunks with CK_Information kind from insertText. (MaskRay#78)
Browse files Browse the repository at this point in the history
Without this ccls inserts "size() const" in the following scenario:

std::string text;
text.si| <-- Trigger completion here and pick "size"
  • Loading branch information
Riatre authored and MaskRay committed Sep 22, 2018
1 parent 4d76108 commit 1a51916
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/messages/textDocument_completion.cc
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ void BuildItem(std::vector<lsCompletionItem> &out,
out[i].insertText +=
"${" + std::to_string(out[i].parameters_.size()) + ":" + text + "}";
out[i].insertTextFormat = lsInsertTextFormat::Snippet;
} else {
} else if (Kind != CodeCompletionString::CK_Informative) {
out[i].insertText += text;
}
}
Expand Down

0 comments on commit 1a51916

Please sign in to comment.