Unnamed repository; edit this file 'description' to name the repository.
feat(lsp): add container name as a column in the symbol pickers (#12930)
David Vogt 2025-02-27
parent 0ba2e05 · commit c98302a
-rw-r--r--helix-term/src/commands/lsp.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/helix-term/src/commands/lsp.rs b/helix-term/src/commands/lsp.rs
index 130428d4..1ef4d4bd 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)