From eec8c390417ef3a0b6b2853f81aea598c06cb150 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Mon, 9 Dec 2024 16:04:00 +0100 Subject: [PATCH] lsp: Better hover information for images in text only editors Whow the path when the editor can not render the image itself. --- tools/lsp/language/hover.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lsp/language/hover.rs b/tools/lsp/language/hover.rs index 46265c607ac..74262a9e236 100644 --- a/tools/lsp/language/hover.rs +++ b/tools/lsp/language/hover.rs @@ -44,7 +44,7 @@ pub fn get_tooltip(document_cache: &mut DocumentCache, token: SyntaxToken) -> Op }, TokenInfo::Image(path) => MarkupContent { kind: lsp_types::MarkupKind::Markdown, - value: format!("![Image]({})", path.to_string_lossy()), + value: format!("![{0}]({0})", path.to_string_lossy()), }, // Todo: this can happen when there is some syntax error TokenInfo::LocalProperty(_) | TokenInfo::LocalCallback(_) => return None,