Merge pull request #105350 from HolonProduction/lsp-empty-docs

LSP: Don't serialize empty documentation
This commit is contained in:
Thaddeus Crews 2026-02-24 09:29:36 -06:00
commit b063ada54a
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC

View file

@ -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()) {