Merge pull request #105350 from HolonProduction/lsp-empty-docs
LSP: Don't serialize empty documentation
This commit is contained in:
commit
b063ada54a
1 changed files with 6 additions and 2 deletions
|
|
@ -1077,8 +1077,12 @@ struct CompletionItem {
|
||||||
dict["insertText"] = insertText;
|
dict["insertText"] = insertText;
|
||||||
}
|
}
|
||||||
if (resolved) {
|
if (resolved) {
|
||||||
dict["detail"] = detail;
|
if (!detail.is_empty()) {
|
||||||
dict["documentation"] = documentation.to_json();
|
dict["detail"] = detail;
|
||||||
|
}
|
||||||
|
if (!documentation.value.is_empty()) {
|
||||||
|
dict["documentation"] = documentation.to_json();
|
||||||
|
}
|
||||||
dict["deprecated"] = deprecated;
|
dict["deprecated"] = deprecated;
|
||||||
dict["preselect"] = preselect;
|
dict["preselect"] = preselect;
|
||||||
if (!sortText.is_empty()) {
|
if (!sortText.is_empty()) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue