Move workspace
module into its own crate
This commit is contained in:
parent
2087c4731f
commit
499616d769
24 changed files with 1696 additions and 1584 deletions
15
Cargo.lock
generated
15
Cargo.lock
generated
|
@ -6031,6 +6031,20 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "workspace"
|
name = "workspace"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"anyhow",
|
||||||
|
"buffer",
|
||||||
|
"client",
|
||||||
|
"editor",
|
||||||
|
"gpui",
|
||||||
|
"log",
|
||||||
|
"postage",
|
||||||
|
"project",
|
||||||
|
"serde_json 1.0.64",
|
||||||
|
"theme",
|
||||||
|
"tree-sitter",
|
||||||
|
"tree-sitter-rust",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wyz"
|
name = "wyz"
|
||||||
|
@ -6122,6 +6136,7 @@ dependencies = [
|
||||||
"unindent",
|
"unindent",
|
||||||
"url",
|
"url",
|
||||||
"util",
|
"util",
|
||||||
|
"workspace",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
|
@ -4,14 +4,13 @@ version = "0.1.0"
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
test-support = []
|
test-support = ["rpc/test-support"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
gpui = { path = "../gpui" }
|
gpui = { path = "../gpui" }
|
||||||
util = { path = "../util" }
|
util = { path = "../util" }
|
||||||
rpc = { path = "../rpc" }
|
rpc = { path = "../rpc" }
|
||||||
sum_tree = { path = "../sum_tree" }
|
sum_tree = { path = "../sum_tree" }
|
||||||
|
|
||||||
anyhow = "1.0.38"
|
anyhow = "1.0.38"
|
||||||
async-recursion = "0.3"
|
async-recursion = "0.3"
|
||||||
async-tungstenite = { version = "0.14", features = ["async-tls"] }
|
async-tungstenite = { version = "0.14", features = ["async-tls"] }
|
||||||
|
|
|
@ -11,7 +11,7 @@ use async_tungstenite::tungstenite::{
|
||||||
error::Error as WebsocketError,
|
error::Error as WebsocketError,
|
||||||
http::{Request, StatusCode},
|
http::{Request, StatusCode},
|
||||||
};
|
};
|
||||||
use gpui::{AsyncAppContext, Entity, ModelContext, Task};
|
use gpui::{action, AsyncAppContext, Entity, ModelContext, MutableAppContext, Task};
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
use parking_lot::RwLock;
|
use parking_lot::RwLock;
|
||||||
use postage::{prelude::Stream, watch};
|
use postage::{prelude::Stream, watch};
|
||||||
|
@ -28,7 +28,7 @@ use std::{
|
||||||
};
|
};
|
||||||
use surf::Url;
|
use surf::Url;
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
use util::ResultExt;
|
use util::{ResultExt, TryFutureExt};
|
||||||
|
|
||||||
pub use channel::*;
|
pub use channel::*;
|
||||||
pub use rpc::*;
|
pub use rpc::*;
|
||||||
|
@ -42,6 +42,16 @@ lazy_static! {
|
||||||
.and_then(|s| if s.is_empty() { None } else { Some(s) });
|
.and_then(|s| if s.is_empty() { None } else { Some(s) });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
action!(Authenticate);
|
||||||
|
|
||||||
|
pub fn init(rpc: Arc<Client>, cx: &mut MutableAppContext) {
|
||||||
|
cx.add_global_action(move |_: &Authenticate, cx| {
|
||||||
|
let rpc = rpc.clone();
|
||||||
|
cx.spawn(|cx| async move { rpc.authenticate_and_connect(&cx).log_err().await })
|
||||||
|
.detach();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
pub struct Client {
|
pub struct Client {
|
||||||
peer: Arc<Peer>,
|
peer: Arc<Peer>,
|
||||||
state: RwLock<ClientState>,
|
state: RwLock<ClientState>,
|
||||||
|
|
|
@ -283,7 +283,7 @@ pub struct EditorSettings {
|
||||||
pub style: EditorStyle,
|
pub style: EditorStyle,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Deserialize)]
|
#[derive(Clone, Deserialize, Default)]
|
||||||
pub struct EditorStyle {
|
pub struct EditorStyle {
|
||||||
pub text: TextStyle,
|
pub text: TextStyle,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
|
|
|
@ -18,7 +18,7 @@ pub struct Label {
|
||||||
highlight_indices: Vec<usize>,
|
highlight_indices: Vec<usize>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize)]
|
#[derive(Clone, Debug, Deserialize, Default)]
|
||||||
pub struct LabelStyle {
|
pub struct LabelStyle {
|
||||||
pub text: TextStyle,
|
pub text: TextStyle,
|
||||||
pub highlight_text: Option<TextStyle>,
|
pub highlight_text: Option<TextStyle>,
|
||||||
|
|
|
@ -167,6 +167,32 @@ impl From<TextStyle> for HighlightStyle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for TextStyle {
|
||||||
|
fn default() -> Self {
|
||||||
|
FONT_CACHE.with(|font_cache| {
|
||||||
|
let font_cache = font_cache.borrow();
|
||||||
|
let font_cache = font_cache
|
||||||
|
.as_ref()
|
||||||
|
.expect("TextStyle::default can only be called within a call to with_font_cache");
|
||||||
|
|
||||||
|
let font_family_name = Arc::from("Courier");
|
||||||
|
let font_family_id = font_cache.load_family(&[&font_family_name]).unwrap();
|
||||||
|
let font_id = font_cache
|
||||||
|
.select_font(font_family_id, &Default::default())
|
||||||
|
.unwrap();
|
||||||
|
Self {
|
||||||
|
color: Default::default(),
|
||||||
|
font_family_name,
|
||||||
|
font_family_id,
|
||||||
|
font_id,
|
||||||
|
font_size: 14.,
|
||||||
|
font_properties: Default::default(),
|
||||||
|
underline: Default::default(),
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl HighlightStyle {
|
impl HighlightStyle {
|
||||||
fn from_json(json: HighlightStyleJson) -> Self {
|
fn from_json(json: HighlightStyleJson) -> Self {
|
||||||
let font_properties = properties_from_json(json.weight, json.italic);
|
let font_properties = properties_from_json(json.weight, json.italic);
|
||||||
|
|
|
@ -985,7 +985,7 @@ mod tests {
|
||||||
fs::{FakeFs, Fs as _},
|
fs::{FakeFs, Fs as _},
|
||||||
people_panel::JoinWorktree,
|
people_panel::JoinWorktree,
|
||||||
project::{ProjectPath, Worktree},
|
project::{ProjectPath, Worktree},
|
||||||
workspace::Workspace,
|
workspace::{Workspace, WorkspaceParams},
|
||||||
};
|
};
|
||||||
|
|
||||||
#[gpui::test]
|
#[gpui::test]
|
||||||
|
@ -1102,13 +1102,9 @@ mod tests {
|
||||||
let mut server = TestServer::start().await;
|
let mut server = TestServer::start().await;
|
||||||
let (client_a, _) = server.create_client(&mut cx_a, "user_a").await;
|
let (client_a, _) = server.create_client(&mut cx_a, "user_a").await;
|
||||||
let (client_b, user_store_b) = server.create_client(&mut cx_b, "user_b").await;
|
let (client_b, user_store_b) = server.create_client(&mut cx_b, "user_b").await;
|
||||||
let app_state_b = zed::AppState {
|
let mut workspace_b_params = cx_b.update(WorkspaceParams::test);
|
||||||
client: client_b,
|
workspace_b_params.client = client_b;
|
||||||
user_store: user_store_b,
|
workspace_b_params.user_store = user_store_b;
|
||||||
..Arc::try_unwrap(cx_b.update(zed::test::test_app_state))
|
|
||||||
.ok()
|
|
||||||
.unwrap()
|
|
||||||
};
|
|
||||||
|
|
||||||
cx_a.foreground().forbid_parking();
|
cx_a.foreground().forbid_parking();
|
||||||
|
|
||||||
|
@ -1141,7 +1137,7 @@ mod tests {
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
let (window_b, workspace_b) = cx_b.add_window(|cx| Workspace::new(&app_state_b, cx));
|
let (window_b, workspace_b) = cx_b.add_window(|cx| Workspace::new(&workspace_b_params, cx));
|
||||||
cx_b.update(|cx| {
|
cx_b.update(|cx| {
|
||||||
cx.dispatch_action(
|
cx.dispatch_action(
|
||||||
window_b,
|
window_b,
|
||||||
|
|
|
@ -14,7 +14,7 @@ pub use theme_registry::*;
|
||||||
|
|
||||||
pub const DEFAULT_THEME_NAME: &'static str = "black";
|
pub const DEFAULT_THEME_NAME: &'static str = "black";
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize, Default)]
|
||||||
pub struct Theme {
|
pub struct Theme {
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub name: String,
|
pub name: String,
|
||||||
|
@ -26,7 +26,7 @@ pub struct Theme {
|
||||||
pub editor: EditorStyle,
|
pub editor: EditorStyle,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize, Default)]
|
||||||
pub struct Workspace {
|
pub struct Workspace {
|
||||||
pub background: Color,
|
pub background: Color,
|
||||||
pub titlebar: Titlebar,
|
pub titlebar: Titlebar,
|
||||||
|
@ -37,7 +37,7 @@ pub struct Workspace {
|
||||||
pub right_sidebar: Sidebar,
|
pub right_sidebar: Sidebar,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Deserialize)]
|
#[derive(Clone, Deserialize, Default)]
|
||||||
pub struct Titlebar {
|
pub struct Titlebar {
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
pub container: ContainerStyle,
|
pub container: ContainerStyle,
|
||||||
|
@ -49,14 +49,14 @@ pub struct Titlebar {
|
||||||
pub outdated_warning: ContainedText,
|
pub outdated_warning: ContainedText,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Deserialize)]
|
#[derive(Clone, Deserialize, Default)]
|
||||||
pub struct OfflineIcon {
|
pub struct OfflineIcon {
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
pub container: ContainerStyle,
|
pub container: ContainerStyle,
|
||||||
pub width: f32,
|
pub width: f32,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Deserialize)]
|
#[derive(Clone, Deserialize, Default)]
|
||||||
pub struct Tab {
|
pub struct Tab {
|
||||||
pub height: f32,
|
pub height: f32,
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
|
@ -71,7 +71,7 @@ pub struct Tab {
|
||||||
pub icon_conflict: Color,
|
pub icon_conflict: Color,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize, Default)]
|
||||||
pub struct Sidebar {
|
pub struct Sidebar {
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
pub container: ContainerStyle,
|
pub container: ContainerStyle,
|
||||||
|
@ -81,14 +81,14 @@ pub struct Sidebar {
|
||||||
pub resize_handle: ContainerStyle,
|
pub resize_handle: ContainerStyle,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize, Default)]
|
||||||
pub struct SidebarItem {
|
pub struct SidebarItem {
|
||||||
pub icon_color: Color,
|
pub icon_color: Color,
|
||||||
pub icon_size: f32,
|
pub icon_size: f32,
|
||||||
pub height: f32,
|
pub height: f32,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize, Default)]
|
||||||
pub struct ChatPanel {
|
pub struct ChatPanel {
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
pub container: ContainerStyle,
|
pub container: ContainerStyle,
|
||||||
|
@ -100,7 +100,7 @@ pub struct ChatPanel {
|
||||||
pub hovered_sign_in_prompt: TextStyle,
|
pub hovered_sign_in_prompt: TextStyle,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize, Default)]
|
||||||
pub struct ProjectPanel {
|
pub struct ProjectPanel {
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
pub container: ContainerStyle,
|
pub container: ContainerStyle,
|
||||||
|
@ -110,7 +110,7 @@ pub struct ProjectPanel {
|
||||||
pub hovered_selected_entry: ProjectPanelEntry,
|
pub hovered_selected_entry: ProjectPanelEntry,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize, Default)]
|
||||||
pub struct ProjectPanelEntry {
|
pub struct ProjectPanelEntry {
|
||||||
pub height: f32,
|
pub height: f32,
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
|
@ -121,7 +121,7 @@ pub struct ProjectPanelEntry {
|
||||||
pub icon_spacing: f32,
|
pub icon_spacing: f32,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize, Default)]
|
||||||
pub struct PeoplePanel {
|
pub struct PeoplePanel {
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
pub container: ContainerStyle,
|
pub container: ContainerStyle,
|
||||||
|
@ -136,7 +136,7 @@ pub struct PeoplePanel {
|
||||||
pub hovered_unshared_worktree: WorktreeRow,
|
pub hovered_unshared_worktree: WorktreeRow,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize, Default)]
|
||||||
pub struct WorktreeRow {
|
pub struct WorktreeRow {
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
pub container: ContainerStyle,
|
pub container: ContainerStyle,
|
||||||
|
@ -146,7 +146,7 @@ pub struct WorktreeRow {
|
||||||
pub guest_avatar_spacing: f32,
|
pub guest_avatar_spacing: f32,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize, Default)]
|
||||||
pub struct ChatMessage {
|
pub struct ChatMessage {
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
pub container: ContainerStyle,
|
pub container: ContainerStyle,
|
||||||
|
@ -155,7 +155,7 @@ pub struct ChatMessage {
|
||||||
pub timestamp: ContainedText,
|
pub timestamp: ContainedText,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize, Default)]
|
||||||
pub struct ChannelSelect {
|
pub struct ChannelSelect {
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
pub container: ContainerStyle,
|
pub container: ContainerStyle,
|
||||||
|
@ -167,7 +167,7 @@ pub struct ChannelSelect {
|
||||||
pub menu: ContainerStyle,
|
pub menu: ContainerStyle,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize, Default)]
|
||||||
pub struct ChannelName {
|
pub struct ChannelName {
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
pub container: ContainerStyle,
|
pub container: ContainerStyle,
|
||||||
|
@ -175,7 +175,7 @@ pub struct ChannelName {
|
||||||
pub name: TextStyle,
|
pub name: TextStyle,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize, Default)]
|
||||||
pub struct Selector {
|
pub struct Selector {
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
pub container: ContainerStyle,
|
pub container: ContainerStyle,
|
||||||
|
@ -185,7 +185,7 @@ pub struct Selector {
|
||||||
pub active_item: ContainedLabel,
|
pub active_item: ContainedLabel,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize)]
|
#[derive(Clone, Debug, Deserialize, Default)]
|
||||||
pub struct ContainedText {
|
pub struct ContainedText {
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
pub container: ContainerStyle,
|
pub container: ContainerStyle,
|
||||||
|
@ -193,7 +193,7 @@ pub struct ContainedText {
|
||||||
pub text: TextStyle,
|
pub text: TextStyle,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize, Default)]
|
||||||
pub struct ContainedLabel {
|
pub struct ContainedLabel {
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
pub container: ContainerStyle,
|
pub container: ContainerStyle,
|
||||||
|
@ -201,7 +201,7 @@ pub struct ContainedLabel {
|
||||||
pub label: LabelStyle,
|
pub label: LabelStyle,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Deserialize)]
|
#[derive(Clone, Deserialize, Default)]
|
||||||
pub struct InputEditorStyle {
|
pub struct InputEditorStyle {
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
pub container: ContainerStyle,
|
pub container: ContainerStyle,
|
||||||
|
|
|
@ -2,3 +2,31 @@
|
||||||
name = "workspace"
|
name = "workspace"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
|
[features]
|
||||||
|
test-support = [
|
||||||
|
"client/test-support",
|
||||||
|
"project/test-support",
|
||||||
|
"tree-sitter",
|
||||||
|
"tree-sitter-rust"
|
||||||
|
]
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
buffer = { path = "../buffer" }
|
||||||
|
client = { path = "../client" }
|
||||||
|
editor = { path = "../editor" }
|
||||||
|
gpui = { path = "../gpui" }
|
||||||
|
project = { path = "../project" }
|
||||||
|
theme = { path = "../theme" }
|
||||||
|
anyhow = "1.0.38"
|
||||||
|
log = "0.4"
|
||||||
|
postage = { version = "0.4.1", features = ["futures-traits"] }
|
||||||
|
tree-sitter = { version = "0.19.5", optional = true }
|
||||||
|
tree-sitter-rust = { version = "0.19.0", optional = true }
|
||||||
|
|
||||||
|
[dev-dependencies]
|
||||||
|
client = { path = "../client", features = ["test-support"] }
|
||||||
|
project = { path = "../project", features = ["test-support"] }
|
||||||
|
serde_json = { version = "1.0.64", features = ["preserve_order"] }
|
||||||
|
tree-sitter = "0.19.5"
|
||||||
|
tree-sitter-rust = "0.19.0"
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
use super::{Item, ItemView};
|
use super::{Item, ItemView};
|
||||||
use crate::{project::ProjectPath, Settings};
|
use crate::Settings;
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use buffer::{Buffer, File as _};
|
use buffer::{Buffer, File as _};
|
||||||
use editor::{Editor, EditorSettings, Event};
|
use editor::{Editor, EditorSettings, Event};
|
||||||
use gpui::{fonts::TextStyle, AppContext, ModelHandle, Task, ViewContext};
|
use gpui::{fonts::TextStyle, AppContext, ModelHandle, Task, ViewContext};
|
||||||
use postage::watch;
|
use postage::watch;
|
||||||
use project::Worktree;
|
use project::{ProjectPath, Worktree};
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
impl Item for Buffer {
|
impl Item for Buffer {
|
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,5 @@
|
||||||
use super::{ItemViewHandle, SplitDirection};
|
use super::{ItemViewHandle, SplitDirection};
|
||||||
use crate::{project::ProjectPath, settings::Settings};
|
use crate::Settings;
|
||||||
use gpui::{
|
use gpui::{
|
||||||
action,
|
action,
|
||||||
elements::*,
|
elements::*,
|
||||||
|
@ -9,6 +9,7 @@ use gpui::{
|
||||||
Entity, MutableAppContext, Quad, RenderContext, View, ViewContext, ViewHandle,
|
Entity, MutableAppContext, Quad, RenderContext, View, ViewContext, ViewHandle,
|
||||||
};
|
};
|
||||||
use postage::watch;
|
use postage::watch;
|
||||||
|
use project::ProjectPath;
|
||||||
use std::cmp;
|
use std::cmp;
|
||||||
|
|
||||||
action!(Split, SplitDirection);
|
action!(Split, SplitDirection);
|
|
@ -36,6 +36,7 @@ rpc = { path = "../rpc" }
|
||||||
sum_tree = { path = "../sum_tree" }
|
sum_tree = { path = "../sum_tree" }
|
||||||
theme = { path = "../theme" }
|
theme = { path = "../theme" }
|
||||||
util = { path = "../util" }
|
util = { path = "../util" }
|
||||||
|
workspace = { path = "../workspace" }
|
||||||
anyhow = "1.0.38"
|
anyhow = "1.0.38"
|
||||||
async-recursion = "0.3"
|
async-recursion = "0.3"
|
||||||
async-trait = "0.1"
|
async-trait = "0.1"
|
||||||
|
@ -83,6 +84,7 @@ project = { path = "../project", features = ["test-support"] }
|
||||||
rpc = { path = "../rpc", features = ["test-support"] }
|
rpc = { path = "../rpc", features = ["test-support"] }
|
||||||
client = { path = "../client", features = ["test-support"] }
|
client = { path = "../client", features = ["test-support"] }
|
||||||
util = { path = "../util", features = ["test-support"] }
|
util = { path = "../util", features = ["test-support"] }
|
||||||
|
workspace = { path = "../workspace", features = ["test-support"] }
|
||||||
cargo-bundle = "0.5.0"
|
cargo-bundle = "0.5.0"
|
||||||
env_logger = "0.8"
|
env_logger = "0.8"
|
||||||
serde_json = { version = "1.0.64", features = ["preserve_order"] }
|
serde_json = { version = "1.0.64", features = ["preserve_order"] }
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
use crate::{settings::Settings, workspace::Workspace};
|
|
||||||
use editor::{Editor, EditorSettings};
|
use editor::{Editor, EditorSettings};
|
||||||
use fuzzy::PathMatch;
|
use fuzzy::PathMatch;
|
||||||
use gpui::{
|
use gpui::{
|
||||||
|
@ -23,6 +22,7 @@ use std::{
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
use util::post_inc;
|
use util::post_inc;
|
||||||
|
use workspace::{Settings, Workspace};
|
||||||
|
|
||||||
pub struct FileFinder {
|
pub struct FileFinder {
|
||||||
handle: WeakViewHandle<Self>,
|
handle: WeakViewHandle<Self>,
|
||||||
|
@ -422,16 +422,15 @@ impl FileFinder {
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::{test::test_app_state, workspace::Workspace};
|
|
||||||
use editor::Insert;
|
use editor::Insert;
|
||||||
use project::fs::FakeFs;
|
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
use workspace::{Workspace, WorkspaceParams};
|
||||||
|
|
||||||
#[gpui::test]
|
#[gpui::test]
|
||||||
async fn test_matching_paths(mut cx: gpui::TestAppContext) {
|
async fn test_matching_paths(mut cx: gpui::TestAppContext) {
|
||||||
let app_state = cx.update(test_app_state);
|
let params = cx.update(WorkspaceParams::test);
|
||||||
app_state
|
params
|
||||||
.fs
|
.fs
|
||||||
.as_fake()
|
.as_fake()
|
||||||
.insert_tree(
|
.insert_tree(
|
||||||
|
@ -449,7 +448,7 @@ mod tests {
|
||||||
editor::init(cx);
|
editor::init(cx);
|
||||||
});
|
});
|
||||||
|
|
||||||
let (window_id, workspace) = cx.add_window(|cx| Workspace::new(&app_state, cx));
|
let (window_id, workspace) = cx.add_window(|cx| Workspace::new(¶ms, cx));
|
||||||
workspace
|
workspace
|
||||||
.update(&mut cx, |workspace, cx| {
|
.update(&mut cx, |workspace, cx| {
|
||||||
workspace.add_worktree(Path::new("/root"), cx)
|
workspace.add_worktree(Path::new("/root"), cx)
|
||||||
|
@ -493,7 +492,8 @@ mod tests {
|
||||||
|
|
||||||
#[gpui::test]
|
#[gpui::test]
|
||||||
async fn test_matching_cancellation(mut cx: gpui::TestAppContext) {
|
async fn test_matching_cancellation(mut cx: gpui::TestAppContext) {
|
||||||
let fs = Arc::new(FakeFs::new());
|
let params = cx.update(WorkspaceParams::test);
|
||||||
|
let fs = params.fs.as_fake();
|
||||||
fs.insert_tree(
|
fs.insert_tree(
|
||||||
"/dir",
|
"/dir",
|
||||||
json!({
|
json!({
|
||||||
|
@ -508,10 +508,7 @@ mod tests {
|
||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
let mut app_state = cx.update(test_app_state);
|
let (_, workspace) = cx.add_window(|cx| Workspace::new(¶ms, cx));
|
||||||
Arc::get_mut(&mut app_state).unwrap().fs = fs;
|
|
||||||
|
|
||||||
let (_, workspace) = cx.add_window(|cx| Workspace::new(&app_state, cx));
|
|
||||||
workspace
|
workspace
|
||||||
.update(&mut cx, |workspace, cx| {
|
.update(&mut cx, |workspace, cx| {
|
||||||
workspace.add_worktree("/dir".as_ref(), cx)
|
workspace.add_worktree("/dir".as_ref(), cx)
|
||||||
|
@ -522,7 +519,7 @@ mod tests {
|
||||||
.await;
|
.await;
|
||||||
let (_, finder) = cx.add_window(|cx| {
|
let (_, finder) = cx.add_window(|cx| {
|
||||||
FileFinder::new(
|
FileFinder::new(
|
||||||
app_state.settings.clone(),
|
params.settings.clone(),
|
||||||
workspace.read(cx).project().clone(),
|
workspace.read(cx).project().clone(),
|
||||||
cx,
|
cx,
|
||||||
)
|
)
|
||||||
|
@ -569,14 +566,14 @@ mod tests {
|
||||||
|
|
||||||
#[gpui::test]
|
#[gpui::test]
|
||||||
async fn test_single_file_worktrees(mut cx: gpui::TestAppContext) {
|
async fn test_single_file_worktrees(mut cx: gpui::TestAppContext) {
|
||||||
let app_state = cx.update(test_app_state);
|
let params = cx.update(WorkspaceParams::test);
|
||||||
app_state
|
params
|
||||||
.fs
|
.fs
|
||||||
.as_fake()
|
.as_fake()
|
||||||
.insert_tree("/root", json!({ "the-parent-dir": { "the-file": "" } }))
|
.insert_tree("/root", json!({ "the-parent-dir": { "the-file": "" } }))
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
let (_, workspace) = cx.add_window(|cx| Workspace::new(&app_state, cx));
|
let (_, workspace) = cx.add_window(|cx| Workspace::new(¶ms, cx));
|
||||||
workspace
|
workspace
|
||||||
.update(&mut cx, |workspace, cx| {
|
.update(&mut cx, |workspace, cx| {
|
||||||
workspace.add_worktree(Path::new("/root/the-parent-dir/the-file"), cx)
|
workspace.add_worktree(Path::new("/root/the-parent-dir/the-file"), cx)
|
||||||
|
@ -587,7 +584,7 @@ mod tests {
|
||||||
.await;
|
.await;
|
||||||
let (_, finder) = cx.add_window(|cx| {
|
let (_, finder) = cx.add_window(|cx| {
|
||||||
FileFinder::new(
|
FileFinder::new(
|
||||||
app_state.settings.clone(),
|
params.settings.clone(),
|
||||||
workspace.read(cx).project().clone(),
|
workspace.read(cx).project().clone(),
|
||||||
cx,
|
cx,
|
||||||
)
|
)
|
||||||
|
@ -622,8 +619,8 @@ mod tests {
|
||||||
|
|
||||||
#[gpui::test(retries = 5)]
|
#[gpui::test(retries = 5)]
|
||||||
async fn test_multiple_matches_with_same_relative_path(mut cx: gpui::TestAppContext) {
|
async fn test_multiple_matches_with_same_relative_path(mut cx: gpui::TestAppContext) {
|
||||||
let app_state = cx.update(test_app_state);
|
let params = cx.update(WorkspaceParams::test);
|
||||||
app_state
|
params
|
||||||
.fs
|
.fs
|
||||||
.as_fake()
|
.as_fake()
|
||||||
.insert_tree(
|
.insert_tree(
|
||||||
|
@ -635,7 +632,7 @@ mod tests {
|
||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
let (_, workspace) = cx.add_window(|cx| Workspace::new(&app_state, cx));
|
let (_, workspace) = cx.add_window(|cx| Workspace::new(¶ms, cx));
|
||||||
|
|
||||||
workspace
|
workspace
|
||||||
.update(&mut cx, |workspace, cx| {
|
.update(&mut cx, |workspace, cx| {
|
||||||
|
@ -650,7 +647,7 @@ mod tests {
|
||||||
|
|
||||||
let (_, finder) = cx.add_window(|cx| {
|
let (_, finder) = cx.add_window(|cx| {
|
||||||
FileFinder::new(
|
FileFinder::new(
|
||||||
app_state.settings.clone(),
|
params.settings.clone(),
|
||||||
workspace.read(cx).project().clone(),
|
workspace.read(cx).project().clone(),
|
||||||
cx,
|
cx,
|
||||||
)
|
)
|
||||||
|
|
|
@ -5,11 +5,9 @@ pub mod language;
|
||||||
pub mod menus;
|
pub mod menus;
|
||||||
pub mod people_panel;
|
pub mod people_panel;
|
||||||
pub mod project_panel;
|
pub mod project_panel;
|
||||||
pub mod settings;
|
|
||||||
#[cfg(any(test, feature = "test-support"))]
|
#[cfg(any(test, feature = "test-support"))]
|
||||||
pub mod test;
|
pub mod test;
|
||||||
pub mod theme_selector;
|
pub mod theme_selector;
|
||||||
pub mod workspace;
|
|
||||||
|
|
||||||
pub use buffer;
|
pub use buffer;
|
||||||
use buffer::LanguageRegistry;
|
use buffer::LanguageRegistry;
|
||||||
|
@ -28,18 +26,15 @@ use people_panel::PeoplePanel;
|
||||||
use postage::watch;
|
use postage::watch;
|
||||||
pub use project::{self, fs};
|
pub use project::{self, fs};
|
||||||
use project_panel::ProjectPanel;
|
use project_panel::ProjectPanel;
|
||||||
pub use settings::Settings;
|
|
||||||
use std::{path::PathBuf, sync::Arc};
|
use std::{path::PathBuf, sync::Arc};
|
||||||
use theme::ThemeRegistry;
|
use theme::ThemeRegistry;
|
||||||
use util::TryFutureExt;
|
pub use workspace;
|
||||||
|
use workspace::{Settings, Workspace, WorkspaceParams};
|
||||||
use crate::workspace::Workspace;
|
|
||||||
|
|
||||||
action!(About);
|
action!(About);
|
||||||
action!(Open, Arc<AppState>);
|
action!(Open, Arc<AppState>);
|
||||||
action!(OpenPaths, OpenParams);
|
action!(OpenPaths, OpenParams);
|
||||||
action!(Quit);
|
action!(Quit);
|
||||||
action!(Authenticate);
|
|
||||||
action!(AdjustBufferFontSize, f32);
|
action!(AdjustBufferFontSize, f32);
|
||||||
|
|
||||||
const MIN_FONT_SIZE: f32 = 6.0;
|
const MIN_FONT_SIZE: f32 = 6.0;
|
||||||
|
@ -69,15 +64,6 @@ pub fn init(app_state: &Arc<AppState>, cx: &mut gpui::MutableAppContext) {
|
||||||
cx.add_global_action(open_new);
|
cx.add_global_action(open_new);
|
||||||
cx.add_global_action(quit);
|
cx.add_global_action(quit);
|
||||||
|
|
||||||
cx.add_global_action({
|
|
||||||
let rpc = app_state.client.clone();
|
|
||||||
move |_: &Authenticate, cx| {
|
|
||||||
let rpc = rpc.clone();
|
|
||||||
cx.spawn(|cx| async move { rpc.authenticate_and_connect(&cx).log_err().await })
|
|
||||||
.detach();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
cx.add_global_action({
|
cx.add_global_action({
|
||||||
let settings_tx = app_state.settings_tx.clone();
|
let settings_tx = app_state.settings_tx.clone();
|
||||||
|
|
||||||
|
@ -135,8 +121,9 @@ fn open_paths(action: &OpenPaths, cx: &mut MutableAppContext) -> Task<()> {
|
||||||
log::info!("open new workspace");
|
log::info!("open new workspace");
|
||||||
|
|
||||||
// Add a new workspace if necessary
|
// Add a new workspace if necessary
|
||||||
|
let app_state = &action.0.app_state;
|
||||||
let (_, workspace) = cx.add_window(window_options(), |cx| {
|
let (_, workspace) = cx.add_window(window_options(), |cx| {
|
||||||
build_workspace(&action.0.app_state, cx)
|
build_workspace(&WorkspaceParams::from(app_state.as_ref()), cx)
|
||||||
});
|
});
|
||||||
workspace.update(cx, |workspace, cx| {
|
workspace.update(cx, |workspace, cx| {
|
||||||
workspace.open_paths(&action.0.paths, cx)
|
workspace.open_paths(&action.0.paths, cx)
|
||||||
|
@ -145,33 +132,31 @@ fn open_paths(action: &OpenPaths, cx: &mut MutableAppContext) -> Task<()> {
|
||||||
|
|
||||||
fn open_new(action: &workspace::OpenNew, cx: &mut MutableAppContext) {
|
fn open_new(action: &workspace::OpenNew, cx: &mut MutableAppContext) {
|
||||||
cx.add_window(window_options(), |cx| {
|
cx.add_window(window_options(), |cx| {
|
||||||
let mut workspace = build_workspace(action.0.as_ref(), cx);
|
let mut workspace = build_workspace(&action.0, cx);
|
||||||
workspace.open_new_file(&action, cx);
|
workspace.open_new_file(&action, cx);
|
||||||
workspace
|
workspace
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
fn build_workspace(app_state: &AppState, cx: &mut ViewContext<Workspace>) -> Workspace {
|
fn build_workspace(params: &WorkspaceParams, cx: &mut ViewContext<Workspace>) -> Workspace {
|
||||||
let mut workspace = Workspace::new(app_state, cx);
|
let mut workspace = Workspace::new(params, cx);
|
||||||
let project = workspace.project().clone();
|
let project = workspace.project().clone();
|
||||||
workspace.left_sidebar_mut().add_item(
|
workspace.left_sidebar_mut().add_item(
|
||||||
"icons/folder-tree-16.svg",
|
"icons/folder-tree-16.svg",
|
||||||
ProjectPanel::new(project, app_state.settings.clone(), cx).into(),
|
ProjectPanel::new(project, params.settings.clone(), cx).into(),
|
||||||
);
|
);
|
||||||
workspace.right_sidebar_mut().add_item(
|
workspace.right_sidebar_mut().add_item(
|
||||||
"icons/user-16.svg",
|
"icons/user-16.svg",
|
||||||
cx.add_view(|cx| {
|
cx.add_view(|cx| PeoplePanel::new(params.user_store.clone(), params.settings.clone(), cx))
|
||||||
PeoplePanel::new(app_state.user_store.clone(), app_state.settings.clone(), cx)
|
|
||||||
})
|
|
||||||
.into(),
|
.into(),
|
||||||
);
|
);
|
||||||
workspace.right_sidebar_mut().add_item(
|
workspace.right_sidebar_mut().add_item(
|
||||||
"icons/comment-16.svg",
|
"icons/comment-16.svg",
|
||||||
cx.add_view(|cx| {
|
cx.add_view(|cx| {
|
||||||
ChatPanel::new(
|
ChatPanel::new(
|
||||||
app_state.client.clone(),
|
params.client.clone(),
|
||||||
app_state.channel_list.clone(),
|
params.channel_list.clone(),
|
||||||
app_state.settings.clone(),
|
params.settings.clone(),
|
||||||
cx,
|
cx,
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
@ -193,13 +178,27 @@ fn quit(_: &Quit, cx: &mut gpui::MutableAppContext) {
|
||||||
cx.platform().quit();
|
cx.platform().quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<'a> From<&'a AppState> for WorkspaceParams {
|
||||||
|
fn from(state: &'a AppState) -> Self {
|
||||||
|
Self {
|
||||||
|
client: state.client.clone(),
|
||||||
|
fs: state.fs.clone(),
|
||||||
|
languages: state.languages.clone(),
|
||||||
|
settings: state.settings.clone(),
|
||||||
|
user_store: state.user_store.clone(),
|
||||||
|
channel_list: state.channel_list.clone(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::{test::test_app_state, workspace::ItemView};
|
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
|
use test::test_app_state;
|
||||||
use theme::DEFAULT_THEME_NAME;
|
use theme::DEFAULT_THEME_NAME;
|
||||||
use util::test::temp_tree;
|
use util::test::temp_tree;
|
||||||
|
use workspace::ItemView;
|
||||||
|
|
||||||
#[gpui::test]
|
#[gpui::test]
|
||||||
async fn test_open_paths_action(mut cx: gpui::TestAppContext) {
|
async fn test_open_paths_action(mut cx: gpui::TestAppContext) {
|
||||||
|
@ -270,7 +269,7 @@ mod tests {
|
||||||
async fn test_new_empty_workspace(mut cx: gpui::TestAppContext) {
|
async fn test_new_empty_workspace(mut cx: gpui::TestAppContext) {
|
||||||
let app_state = cx.update(test_app_state);
|
let app_state = cx.update(test_app_state);
|
||||||
cx.update(|cx| init(&app_state, cx));
|
cx.update(|cx| init(&app_state, cx));
|
||||||
cx.dispatch_global_action(workspace::OpenNew(app_state.clone()));
|
cx.dispatch_global_action(workspace::OpenNew(app_state.as_ref().into()));
|
||||||
let window_id = *cx.window_ids().first().unwrap();
|
let window_id = *cx.window_ids().first().unwrap();
|
||||||
let workspace = cx.root_view::<Workspace>(window_id).unwrap();
|
let workspace = cx.root_view::<Workspace>(window_id).unwrap();
|
||||||
let editor = workspace.update(&mut cx, |workspace, cx| {
|
let editor = workspace.update(&mut cx, |workspace, cx| {
|
||||||
|
|
|
@ -8,6 +8,7 @@ use parking_lot::Mutex;
|
||||||
use simplelog::SimpleLogger;
|
use simplelog::SimpleLogger;
|
||||||
use std::{fs, path::PathBuf, sync::Arc};
|
use std::{fs, path::PathBuf, sync::Arc};
|
||||||
use theme::ThemeRegistry;
|
use theme::ThemeRegistry;
|
||||||
|
use workspace::{self, settings, OpenNew};
|
||||||
use zed::{
|
use zed::{
|
||||||
self,
|
self,
|
||||||
assets::Assets,
|
assets::Assets,
|
||||||
|
@ -15,9 +16,7 @@ use zed::{
|
||||||
client::{http, ChannelList, UserStore},
|
client::{http, ChannelList, UserStore},
|
||||||
editor, file_finder,
|
editor, file_finder,
|
||||||
fs::RealFs,
|
fs::RealFs,
|
||||||
language, menus, people_panel, project_panel, settings, theme_selector,
|
language, menus, people_panel, project_panel, theme_selector, AppState, OpenParams, OpenPaths,
|
||||||
workspace::{self, OpenNew},
|
|
||||||
AppState, OpenParams, OpenPaths,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
@ -54,6 +53,7 @@ fn main() {
|
||||||
});
|
});
|
||||||
|
|
||||||
zed::init(&app_state, cx);
|
zed::init(&app_state, cx);
|
||||||
|
client::init(app_state.client.clone(), cx);
|
||||||
workspace::init(cx);
|
workspace::init(cx);
|
||||||
editor::init(cx);
|
editor::init(cx);
|
||||||
file_finder::init(cx);
|
file_finder::init(cx);
|
||||||
|
@ -70,7 +70,7 @@ fn main() {
|
||||||
|
|
||||||
let paths = collect_path_args();
|
let paths = collect_path_args();
|
||||||
if paths.is_empty() {
|
if paths.is_empty() {
|
||||||
cx.dispatch_global_action(OpenNew(app_state));
|
cx.dispatch_global_action(OpenNew(app_state.as_ref().into()));
|
||||||
} else {
|
} else {
|
||||||
cx.dispatch_global_action(OpenPaths(OpenParams { paths, app_state }));
|
cx.dispatch_global_action(OpenPaths(OpenParams { paths, app_state }));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,18 @@
|
||||||
use crate::{workspace, AppState};
|
use crate::{AppState, WorkspaceParams};
|
||||||
use gpui::{Menu, MenuItem};
|
use gpui::{Menu, MenuItem};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
pub fn menus(state: &Arc<AppState>) -> Vec<Menu<'static>> {
|
pub fn menus(state: &Arc<AppState>) -> Vec<Menu<'static>> {
|
||||||
|
let workspace_params = WorkspaceParams {
|
||||||
|
client: state.client.clone(),
|
||||||
|
fs: state.fs.clone(),
|
||||||
|
languages: state.languages.clone(),
|
||||||
|
settings: state.settings.clone(),
|
||||||
|
user_store: state.user_store.clone(),
|
||||||
|
channel_list: state.channel_list.clone(),
|
||||||
|
};
|
||||||
|
|
||||||
vec![
|
vec![
|
||||||
Menu {
|
Menu {
|
||||||
name: "Zed",
|
name: "Zed",
|
||||||
|
@ -27,7 +36,7 @@ pub fn menus(state: &Arc<AppState>) -> Vec<Menu<'static>> {
|
||||||
MenuItem::Action {
|
MenuItem::Action {
|
||||||
name: "New",
|
name: "New",
|
||||||
keystroke: Some("cmd-n"),
|
keystroke: Some("cmd-n"),
|
||||||
action: Box::new(workspace::OpenNew(state.clone())),
|
action: Box::new(workspace::OpenNew(workspace_params)),
|
||||||
},
|
},
|
||||||
MenuItem::Separator,
|
MenuItem::Separator,
|
||||||
MenuItem::Action {
|
MenuItem::Action {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
use crate::{workspace::Workspace, Settings};
|
|
||||||
use client::{Collaborator, UserStore};
|
use client::{Collaborator, UserStore};
|
||||||
use gpui::{
|
use gpui::{
|
||||||
action,
|
action,
|
||||||
|
@ -10,6 +9,7 @@ use gpui::{
|
||||||
};
|
};
|
||||||
use postage::watch;
|
use postage::watch;
|
||||||
use theme::Theme;
|
use theme::Theme;
|
||||||
|
use workspace::{Settings, Workspace};
|
||||||
|
|
||||||
action!(JoinWorktree, u64);
|
action!(JoinWorktree, u64);
|
||||||
action!(LeaveWorktree, u64);
|
action!(LeaveWorktree, u64);
|
||||||
|
|
|
@ -648,7 +648,7 @@ mod tests {
|
||||||
.read_with(&cx, |t, _| t.as_local().unwrap().scan_complete())
|
.read_with(&cx, |t, _| t.as_local().unwrap().scan_complete())
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
let (_, workspace) = cx.add_window(|cx| Workspace::new(&app_state, cx));
|
let (_, workspace) = cx.add_window(|cx| Workspace::new(&app_state.as_ref().into(), cx));
|
||||||
let panel = workspace.update(&mut cx, |_, cx| ProjectPanel::new(project, settings, cx));
|
let panel = workspace.update(&mut cx, |_, cx| ProjectPanel::new(project, settings, cx));
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
visible_entry_details(&panel, 0..50, &mut cx),
|
visible_entry_details(&panel, 0..50, &mut cx),
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::{assets::Assets, language, settings::Settings, AppState};
|
use crate::{assets::Assets, language, AppState};
|
||||||
use buffer::LanguageRegistry;
|
use buffer::LanguageRegistry;
|
||||||
use client::{http::ServerResponse, test::FakeHttpClient, ChannelList, Client, UserStore};
|
use client::{http::ServerResponse, test::FakeHttpClient, ChannelList, Client, UserStore};
|
||||||
use gpui::{AssetSource, MutableAppContext};
|
use gpui::{AssetSource, MutableAppContext};
|
||||||
|
@ -7,6 +7,7 @@ use postage::watch;
|
||||||
use project::fs::FakeFs;
|
use project::fs::FakeFs;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use theme::{Theme, ThemeRegistry, DEFAULT_THEME_NAME};
|
use theme::{Theme, ThemeRegistry, DEFAULT_THEME_NAME};
|
||||||
|
use workspace::Settings;
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
#[ctor::ctor]
|
#[ctor::ctor]
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue