Extract outline rendering to outline
crate (#20179)
This PR extracts the `render_item` implementation for outlines to the `outline` crate to help reduce `language`'s dependence on `theme`. Release Notes: - N/A
This commit is contained in:
parent
4bbde40267
commit
7025d3f29d
6 changed files with 59 additions and 54 deletions
|
@ -24,6 +24,7 @@ gpui.workspace = true
|
|||
language.workspace = true
|
||||
log.workspace = true
|
||||
menu.workspace = true
|
||||
outline.workspace = true
|
||||
project.workspace = true
|
||||
schemars.workspace = true
|
||||
search.workspace = true
|
||||
|
|
|
@ -1672,7 +1672,7 @@ impl OutlinePanel {
|
|||
"{buffer_id:?}|{excerpt_id:?}{:?}|{:?}",
|
||||
rendered_outline.range, &rendered_outline.text,
|
||||
))),
|
||||
language::render_item(
|
||||
outline::render_item(
|
||||
rendered_outline,
|
||||
string_match
|
||||
.map(|string_match| string_match.ranges().collect::<Vec<_>>())
|
||||
|
@ -1911,7 +1911,7 @@ impl OutlinePanel {
|
|||
} else {
|
||||
&search_matches
|
||||
};
|
||||
let label_element = language::render_item(
|
||||
let label_element = outline::render_item(
|
||||
&OutlineItem {
|
||||
depth,
|
||||
annotation_range: None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue