feat(lsp): add container name as a column in the symbol pickers (#12930)
This commit is contained in:
parent
0ba2e05a6f
commit
c98302a543
1 changed files with 14 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue