From eb8c0cdf3d2e03dcd6575f1b4e27ac330e74eee0 Mon Sep 17 00:00:00 2001 From: eidheim Date: Tue, 19 May 2020 10:29:46 +0200 Subject: [PATCH] Language client: diagnostic messages are now parsed as markdown --- src/source_language_protocol.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/source_language_protocol.cc b/src/source_language_protocol.cc index d3ad55b..f55dcfc 100644 --- a/src/source_language_protocol.cc +++ b/src/source_language_protocol.cc @@ -946,7 +946,11 @@ void Source::LanguageProtocolView::update_diagnostics(const std::vectorinsert_at_cursor(diagnostic.message); + if(language_id == "python") { // Python might support markdown in the future + tooltip.buffer->insert_at_cursor(diagnostic.message); + return; + } + tooltip.insert_markdown(diagnostic.message); if(!diagnostic.related_informations.empty()) { auto link_tag = tooltip.buffer->get_tag_table()->lookup("link"); @@ -957,7 +961,7 @@ void Source::LanguageProtocolView::update_diagnostics(const std::vectorinsert_at_cursor("\n\n"); - tooltip.buffer->insert_at_cursor(diagnostic.related_informations[i].message); + tooltip.insert_markdown(diagnostic.related_informations[i].message); tooltip.buffer->insert_at_cursor(": "); auto pos = tooltip.buffer->get_insert()->get_iter(); tooltip.buffer->insert_with_tag(pos, link, link_tag);