mirror of
https://github.com/MaskRay/ccls.git
synced 2024-12-01 20:07:08 +00:00
[hover] Change the first MarkedString's language to "text"
This commit is contained in:
parent
5a22a5cc66
commit
3df71f4145
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
std::pair<optional<std::string>, std::string> GetHoverForSymbol(
|
std::pair<optional<std::string>, std::string> GetCommentsAndHover(
|
||||||
QueryDatabase* db,
|
QueryDatabase* db,
|
||||||
const SymbolIdx& symbol) {
|
const SymbolIdx& symbol) {
|
||||||
switch (symbol.kind) {
|
switch (symbol.kind) {
|
||||||
@ -94,12 +94,12 @@ struct TextDocumentHoverHandler : BaseMessageHandler<Ipc_TextDocumentHover> {
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
std::pair<optional<std::string>, std::string> comments_hover =
|
std::pair<optional<std::string>, std::string> comments_hover =
|
||||||
GetHoverForSymbol(db, ref.idx);
|
GetCommentsAndHover(db, ref.idx);
|
||||||
if (comments_hover.first || comments_hover.second.size()) {
|
if (comments_hover.first || comments_hover.second.size()) {
|
||||||
out.result = Out_TextDocumentHover::Result();
|
out.result = Out_TextDocumentHover::Result();
|
||||||
if (comments_hover.first) {
|
if (comments_hover.first) {
|
||||||
out.result->contents.emplace_back(
|
out.result->contents.emplace_back(
|
||||||
lsMarkedString{file->def->language, *comments_hover.first});
|
lsMarkedString{"text", *comments_hover.first});
|
||||||
}
|
}
|
||||||
if (comments_hover.second.size()) {
|
if (comments_hover.second.size()) {
|
||||||
out.result->contents.emplace_back(
|
out.result->contents.emplace_back(
|
||||||
|
Loading…
Reference in New Issue
Block a user