Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Merge branch 'main' into zed2-breadcrumbs

Julia428c517693c0
diff --cc Cargo.lock
index f2e86f509dd,5ec386837ba..be36a5cf78b
--- a/Cargo.lock
+++ b/Cargo.lock
@@@ -11661,10 -11723,11 +11740,12 @@@ dependencies =
"async-recursion 0.3.2",
"async-tar",
"async-trait",
+ "audio2",
"auto_update2",
"backtrace",
+ "breadcrumbs2",
"call2",
+ "channel2",
"chrono",
"cli",
"client2",
diff --cc crates/editor2/src/editor.rs
index a91827fae74,99d8a4bb93b..65b8b27b6f8
--- a/crates/editor2/src/editor.rs
+++ b/crates/editor2/src/editor.rs
@@@ -151,8 -153,8 +153,7 @@@ pub fn render_parsed_markdown
}
}),
);
- let runs = text_runs_for_highlights(&parsed.text, &editor_style.text, highlights);
- // todo!("add the ability to change cursor style for link ranges")
let mut links = Vec::new();
let mut link_ranges = Vec::new();
for (range, region) in parsed.region_ranges.iter().zip(&parsed.regions) {
diff --cc crates/storybook2/src/stories/text.rs
index 71502087c2c,3cb39aa01a2..ccd13cb4d80
--- a/crates/storybook2/src/stories/text.rs
+++ b/crates/storybook2/src/stories/text.rs
@@@ -59,14 -59,16 +59,14 @@@ impl Render for TextStory
))).child(
InteractiveText::new(
"interactive",
- StyledText::new("Hello world, how is it going?").with_runs(vec![
- cx.text_style().to_run(6),
- TextRun {
+ StyledText::new("Hello world, how is it going?").with_highlights(&cx.text_style(), [
+ (6..11, HighlightStyle {
background_color: Some(green()),
- ..cx.text_style().to_run(5)
- },
- cx.text_style().to_run(18),
+ ..Default::default()
+ }),
]),
)
- .on_click(vec![2..4, 1..3, 7..9], |range_ix, cx| {
+ .on_click(vec![2..4, 1..3, 7..9], |range_ix, _cx| {
println!("Clicked range {range_ix}");
})
)
diff --cc crates/ui2/src/components/label.rs
index 9eb5e7000b1,562131a9697..7aeda3e850f
--- a/crates/ui2/src/components/label.rs
+++ b/crates/ui2/src/components/label.rs
@@@ -1,8 -1,6 +1,8 @@@
+use std::ops::Range;
+
use crate::prelude::*;
use crate::styled_ext::StyledExt;
- use gpui::{relative, Div, HighlightStyle, Hsla, IntoElement, StyledText, WindowContext};
-use gpui::{relative, Div, IntoElement, StyledText, TextRun, WindowContext};
++use gpui::{relative, Div, HighlightStyle, IntoElement, StyledText, WindowContext};
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy, Default)]
pub enum LabelSize {
diff --cc crates/zed2/Cargo.toml
index 20429c4df74,bd2a8e5a2fa..1c3c71a259e
--- a/crates/zed2/Cargo.toml
+++ b/crates/zed2/Cargo.toml
@@@ -16,12 -16,12 +16,12 @@@ path = "src/main.rs
[dependencies]
ai = { package = "ai2", path = "../ai2"}
- # audio = { path = "../audio" }
- # activity_indicator = { path = "../activity_indicator" }
+ audio = { package = "audio2", path = "../audio2" }
+ activity_indicator = { package = "activity_indicator2", path = "../activity_indicator2"}
auto_update = { package = "auto_update2", path = "../auto_update2" }
-# breadcrumbs = { path = "../breadcrumbs" }
+breadcrumbs = { package = "breadcrumbs2", path = "../breadcrumbs2" }
call = { package = "call2", path = "../call2" }
- # channel = { path = "../channel" }
+ channel = { package = "channel2", path = "../channel2" }
cli = { path = "../cli" }
collab_ui = { package = "collab_ui2", path = "../collab_ui2" }
collections = { path = "../collections" }