From c98302a5434d8ca0ae5af82505819af650eb7ce1 Mon Sep 17 00:00:00 2001 From: David Vogt Date: Thu, 27 Feb 2025 00:28:34 +0100 Subject: [PATCH] feat(lsp): add container name as a column in the symbol pickers (#12930) --- helix-term/src/commands/lsp.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/helix-term/src/commands/lsp.rs b/helix-term/src/commands/lsp.rs index 130428d4d..1ef4d4bd9 100644 --- a/helix-term/src/commands/lsp.rs +++ b/helix-term/src/commands/lsp.rs @@ -407,6 +407,13 @@ pub fn symbol_picker(cx: &mut Context) { ui::PickerColumn::new("name", |item: &SymbolInformationItem, _| { item.symbol.name.as_str().into() }), + ui::PickerColumn::new("container", |item: &SymbolInformationItem, _| { + item.symbol + .container_name + .as_deref() + .unwrap_or_default() + .into() + }), ]; let picker = Picker::new( @@ -508,6 +515,13 @@ pub fn workspace_symbol_picker(cx: &mut Context) { item.symbol.name.as_str().into() }) .without_filtering(), + ui::PickerColumn::new("container", |item: &SymbolInformationItem, _| { + item.symbol + .container_name + .as_deref() + .unwrap_or_default() + .into() + }), ui::PickerColumn::new("path", |item: &SymbolInformationItem, _| { if let Some(path) = item.location.uri.as_path() { path::get_relative_path(path)