Open symbol outline when clicking on editor breadcrumbs
This commit is contained in:
parent
35b2aceffb
commit
737e2e1b3c
10 changed files with 102 additions and 29 deletions
|
@ -747,11 +747,15 @@ impl Item for Editor {
|
|||
.map(|path| path.to_string_lossy().to_string())
|
||||
.unwrap_or_else(|| "untitled".to_string());
|
||||
|
||||
let mut breadcrumbs = vec![Label::new(filename, theme.breadcrumbs.text.clone()).boxed()];
|
||||
let filename_label = Label::new(filename, theme.workspace.breadcrumbs.default.text.clone());
|
||||
let mut breadcrumbs = vec![filename_label.boxed()];
|
||||
breadcrumbs.extend(symbols.into_iter().map(|symbol| {
|
||||
Text::new(symbol.text, theme.breadcrumbs.text.clone())
|
||||
.with_highlights(symbol.highlight_ranges)
|
||||
.boxed()
|
||||
Text::new(
|
||||
symbol.text,
|
||||
theme.workspace.breadcrumbs.default.text.clone(),
|
||||
)
|
||||
.with_highlights(symbol.highlight_ranges)
|
||||
.boxed()
|
||||
}));
|
||||
Some(breadcrumbs)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue