Changeset View
Changeset View
Standalone View
Standalone View
addons/lspclient/lspclientserver.cpp
Show First 20 Lines • Show All 750 Lines • ▼ Show 20 Line(s) | 750 | if (items.size() == 0) { | |||
---|---|---|---|---|---|
751 | items = result.toObject().value(QStringLiteral("items")).toArray(); | 751 | items = result.toObject().value(QStringLiteral("items")).toArray(); | ||
752 | } | 752 | } | ||
753 | for (const auto & vitem : items) { | 753 | for (const auto & vitem : items) { | ||
754 | const auto & item = vitem.toObject(); | 754 | const auto & item = vitem.toObject(); | ||
755 | auto label = item.value(MEMBER_LABEL).toString(); | 755 | auto label = item.value(MEMBER_LABEL).toString(); | ||
756 | auto detail = item.value(MEMBER_DETAIL).toString(); | 756 | auto detail = item.value(MEMBER_DETAIL).toString(); | ||
757 | auto doc = parseMarkupContent(item.value(MEMBER_DOCUMENTATION)); | 757 | auto doc = parseMarkupContent(item.value(MEMBER_DOCUMENTATION)); | ||
758 | auto sortText = item.value(QStringLiteral("sortText")).toString(); | 758 | auto sortText = item.value(QStringLiteral("sortText")).toString(); | ||
759 | if (sortText.isEmpty()) | ||||
760 | sortText = label; | ||||
759 | auto insertText = item.value(QStringLiteral("insertText")).toString(); | 761 | auto insertText = item.value(QStringLiteral("insertText")).toString(); | ||
762 | if (insertText.isEmpty()) | ||||
763 | insertText = label; | ||||
760 | auto kind = (LSPCompletionItemKind) item.value(MEMBER_KIND).toInt(); | 764 | auto kind = (LSPCompletionItemKind) item.value(MEMBER_KIND).toInt(); | ||
761 | ret.push_back({label, kind, detail, doc, sortText, insertText}); | 765 | ret.push_back({label, kind, detail, doc, sortText, insertText}); | ||
762 | } | 766 | } | ||
763 | return ret; | 767 | return ret; | ||
764 | } | 768 | } | ||
765 | 769 | | |||
766 | static LSPSignatureInformation | 770 | static LSPSignatureInformation | ||
767 | parseSignatureInformation(const QJsonObject & json) | 771 | parseSignatureInformation(const QJsonObject & json) | ||
▲ Show 20 Lines • Show All 141 Lines • Show Last 20 Lines |