Skip to content

Commit

Permalink
feat(lsp): add container name as a column in the symbol pickers (#12930)
Browse files Browse the repository at this point in the history
  • Loading branch information
winged authored Feb 26, 2025
1 parent 0ba2e05 commit c98302a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions helix-term/src/commands/lsp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit c98302a

Please sign in to comment.