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