From 1fa9dd628445623793005c73ce807d4da9f58d21 Mon Sep 17 00:00:00 2001 From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Date: Thu, 8 Jan 2026 09:18:51 -0300 Subject: [PATCH] lsp_button: Fix long LSP version label (#46359) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If the LSP version label ends up being super long, we now truncate it and add a tooltip so you can see the whole thing. This avoids the submenu width from being extremely big: Screenshot 2026-01-08 at 9  10@2x Release Notes: - Fixed a visual bug where long LSP version labels would increase the LSP submenu width too much. --- crates/language_tools/src/lsp_button.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/language_tools/src/lsp_button.rs b/crates/language_tools/src/lsp_button.rs index 603818640d3af38edd0679743c2b5cf2fb3ebec0..180b858d7eabac5e4c6c33a3d5e9129c6c38c063 100644 --- a/crates/language_tools/src/lsp_button.rs +++ b/crates/language_tools/src/lsp_button.rs @@ -489,8 +489,10 @@ impl LanguageServerState { let metadata_label = metadata_label.clone(); move |_, _| { h_flex() + .id("metadata-container") .ml_neg_1() .gap_1() + .max_w_56() .child( Icon::new(IconName::Circle) .color(status_color) @@ -511,8 +513,10 @@ impl LanguageServerState { .child( Label::new(metadata) .size(LabelSize::Small) - .color(Color::Muted), + .color(Color::Muted) + .truncate(), ) + .tooltip(Tooltip::text(metadata.clone())) }) .into_any_element() }