Merge branch 'main' into randomized-test-improvements

This commit is contained in:
Antonio Scandurra 2022-04-12 10:14:08 +02:00
commit 3e4bc75160
205 changed files with 1469 additions and 1021 deletions

4
.gitignore vendored
View File

@ -3,6 +3,6 @@
.DS_Store .DS_Store
/script/node_modules /script/node_modules
/styles/node_modules /styles/node_modules
/crates/server/.env.toml /crates/collab/.env.toml
/crates/server/static/styles.css /crates/collab/static/styles.css
/vendor/bin /vendor/bin

122
Cargo.lock generated
View File

@ -168,6 +168,15 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbf56136a5198c7b01a49e3afcbef6cf84597273d298f54432926024107b0109" checksum = "bbf56136a5198c7b01a49e3afcbef6cf84597273d298f54432926024107b0109"
[[package]]
name = "assets"
version = "0.1.0"
dependencies = [
"anyhow",
"gpui",
"rust-embed",
]
[[package]] [[package]]
name = "async-attributes" name = "async-attributes"
version = "1.1.2" version = "1.1.2"
@ -1067,6 +1076,60 @@ dependencies = [
"objc", "objc",
] ]
[[package]]
name = "collab"
version = "0.1.0"
dependencies = [
"anyhow",
"async-io",
"async-sqlx-session",
"async-std",
"async-trait",
"async-tungstenite",
"base64 0.13.0",
"clap 3.0.0-beta.2",
"client",
"collections",
"comrak",
"ctor",
"editor",
"either",
"env_logger 0.8.3",
"envy",
"futures",
"gpui",
"handlebars",
"http-auth-basic",
"json_env_logger",
"jwt-simple",
"language",
"lazy_static",
"lipsum",
"log",
"lsp",
"oauth2",
"oauth2-surf",
"parking_lot",
"project",
"rand 0.8.3",
"rpc",
"rust-embed",
"scrypt",
"serde",
"serde_json",
"settings",
"sha-1 0.9.6",
"sqlx 0.5.5",
"surf",
"theme",
"tide",
"tide-compress",
"time 0.2.27",
"toml",
"util",
"workspace",
]
[[package]] [[package]]
name = "collections" name = "collections"
version = "0.1.0" version = "0.1.0"
@ -4300,6 +4363,7 @@ dependencies = [
"log", "log",
"postage", "postage",
"project", "project",
"serde",
"serde_json", "serde_json",
"settings", "settings",
"theme", "theme",
@ -4464,6 +4528,8 @@ name = "settings"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"assets",
"collections",
"gpui", "gpui",
"schemars", "schemars",
"serde", "serde",
@ -5787,6 +5853,7 @@ checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed"
name = "vim" name = "vim"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"assets",
"collections", "collections",
"editor", "editor",
"gpui", "gpui",
@ -5794,6 +5861,7 @@ dependencies = [
"language", "language",
"log", "log",
"project", "project",
"serde",
"settings", "settings",
"util", "util",
"workspace", "workspace",
@ -6061,6 +6129,7 @@ name = "zed"
version = "0.25.0" version = "0.25.0"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"assets",
"async-compression", "async-compression",
"async-recursion", "async-recursion",
"async-trait", "async-trait",
@ -6136,59 +6205,6 @@ dependencies = [
"workspace", "workspace",
] ]
[[package]]
name = "zed-server"
version = "0.1.0"
dependencies = [
"anyhow",
"async-io",
"async-sqlx-session",
"async-std",
"async-trait",
"async-tungstenite",
"base64 0.13.0",
"clap 3.0.0-beta.2",
"client",
"collections",
"comrak",
"ctor",
"editor",
"either",
"env_logger 0.8.3",
"envy",
"futures",
"gpui",
"handlebars",
"http-auth-basic",
"json_env_logger",
"jwt-simple",
"language",
"lazy_static",
"lipsum",
"log",
"lsp",
"oauth2",
"oauth2-surf",
"parking_lot",
"project",
"rand 0.8.3",
"rpc",
"rust-embed",
"scrypt",
"serde",
"serde_json",
"settings",
"sha-1 0.9.6",
"sqlx 0.5.5",
"surf",
"tide",
"tide-compress",
"time 0.2.27",
"toml",
"util",
"workspace",
]
[[package]] [[package]]
name = "zeroize" name = "zeroize"
version = "1.3.0" version = "1.3.0"

View File

@ -14,20 +14,20 @@ RUN --mount=type=cache,target=./script/node_modules \
RUN --mount=type=cache,target=./script/node_modules \ RUN --mount=type=cache,target=./script/node_modules \
script/build-css --release script/build-css --release
# Compile server # Compile collab server
RUN --mount=type=cache,target=./script/node_modules \ RUN --mount=type=cache,target=./script/node_modules \
--mount=type=cache,target=/usr/local/cargo/registry \ --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=./target \ --mount=type=cache,target=./target \
cargo build --release --package zed-server --bin zed-server cargo build --release --package collab --bin collab
# Copy server binary out of cached directory # Copy collab server binary out of cached directory
RUN --mount=type=cache,target=./target \ RUN --mount=type=cache,target=./target \
cp /app/target/release/zed-server /app/zed-server cp /app/target/release/collab /app/collab
# Copy server binary to the runtime image # Copy collab server binary to the runtime image
FROM debian:bullseye-slim as runtime FROM debian:bullseye-slim as runtime
RUN apt-get update; \ RUN apt-get update; \
apt-get install -y --no-install-recommends libcurl4-openssl-dev ca-certificates apt-get install -y --no-install-recommends libcurl4-openssl-dev ca-certificates
WORKDIR app WORKDIR app
COPY --from=builder /app/zed-server /app COPY --from=builder /app/collab /app
ENTRYPOINT ["/app/zed-server"] ENTRYPOINT ["/app/collab"]

View File

@ -11,5 +11,5 @@ RUN apt-get update; \
apt-get install -y --no-install-recommends libssl1.1 apt-get install -y --no-install-recommends libssl1.1
WORKDIR app WORKDIR app
COPY --from=builder /app/bin/sqlx /app COPY --from=builder /app/bin/sqlx /app
COPY ./server/migrations /app/migrations COPY ./collab/migrations /app/migrations
ENTRYPOINT ["/app/sqlx", "migrate", "run"] ENTRYPOINT ["/app/sqlx", "migrate", "run"]

View File

@ -1,2 +1,2 @@
web: cd ../zed.dev && PORT=3000 npx next dev web: cd ../zed.dev && PORT=3000 npx next dev
collab: cd crates/server && cargo run collab: cd crates/collab && cargo run

View File

@ -23,7 +23,7 @@ script/sqlx migrate run
script/seed-db script/seed-db
``` ```
Run `zed.dev` and the collaboration server. Run the web frontend and the collaboration server.
``` ```
brew install foreman brew install foreman

View File

Before

Width:  |  Height:  |  Size: 879 B

After

Width:  |  Height:  |  Size: 879 B

View File

Before

Width:  |  Height:  |  Size: 979 B

After

Width:  |  Height:  |  Size: 979 B

View File

Before

Width:  |  Height:  |  Size: 464 B

After

Width:  |  Height:  |  Size: 464 B

View File

Before

Width:  |  Height:  |  Size: 499 B

After

Width:  |  Height:  |  Size: 499 B

View File

Before

Width:  |  Height:  |  Size: 317 B

After

Width:  |  Height:  |  Size: 317 B

View File

Before

Width:  |  Height:  |  Size: 284 B

After

Width:  |  Height:  |  Size: 284 B

View File

Before

Width:  |  Height:  |  Size: 512 B

After

Width:  |  Height:  |  Size: 512 B

View File

Before

Width:  |  Height:  |  Size: 516 B

After

Width:  |  Height:  |  Size: 516 B

View File

Before

Width:  |  Height:  |  Size: 445 B

After

Width:  |  Height:  |  Size: 445 B

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 776 B

After

Width:  |  Height:  |  Size: 776 B

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 733 B

After

Width:  |  Height:  |  Size: 733 B

View File

Before

Width:  |  Height:  |  Size: 676 B

After

Width:  |  Height:  |  Size: 676 B

View File

Before

Width:  |  Height:  |  Size: 322 B

After

Width:  |  Height:  |  Size: 322 B

259
assets/keymaps/default.json Normal file
View File

@ -0,0 +1,259 @@
{
"*": {
"ctrl-alt-cmd-f": "workspace::FollowNextCollaborator",
"cmd-s": "workspace::Save",
"cmd-alt-i": "zed::DebugElements",
"cmd-k cmd-left": "workspace::ActivatePreviousPane",
"cmd-k cmd-right": "workspace::ActivateNextPane",
"cmd-=": "zed::IncreaseBufferFontSize",
"cmd--": "zed::DecreaseBufferFontSize",
"cmd-,": "zed::OpenSettings"
},
"menu": {
"up": "menu::SelectPrev",
"ctrl-p": "menu::SelectPrev",
"down": "menu::SelectNext",
"ctrl-n": "menu::SelectNext",
"cmd-up": "menu::SelectFirst",
"cmd-down": "menu::SelectLast",
"enter": "menu::Confirm"
},
"Pane": {
"shift-cmd-{": "pane::ActivatePrevItem",
"shift-cmd-}": "pane::ActivateNextItem",
"cmd-w": "pane::CloseActiveItem",
"alt-cmd-w": "pane::CloseInactiveItems",
"ctrl--": "pane::GoBack",
"shift-ctrl-_": "pane::GoForward",
"cmd-k up": [
"pane::Split",
"Up"
],
"cmd-k down": [
"pane::Split",
"Down"
],
"cmd-k left": [
"pane::Split",
"Left"
],
"cmd-k right": [
"pane::Split",
"Right"
],
"cmd-shift-F": "project_search::ToggleFocus",
"cmd-f": "project_search::ToggleFocus",
"cmd-g": "search::SelectNextMatch",
"cmd-shift-G": "search::SelectPrevMatch"
},
"Workspace": {
"cmd-shift-F": "project_search::Deploy",
"cmd-k cmd-t": "theme_selector::Toggle",
"cmd-k t": "theme_selector::Reload",
"cmd-t": "project_symbols::Toggle",
"cmd-p": "file_finder::Toggle",
"alt-shift-D": "diagnostics::Deploy",
"ctrl-alt-cmd-j": "journal::NewJournalEntry"
},
"ProjectSearchBar": {
"enter": "project_search::Search",
"cmd-enter": "project_search::SearchInNew"
},
"BufferSearchBar": {
"escape": "buffer_search::Dismiss",
"cmd-f": "buffer_search::FocusEditor",
"enter": "search::SelectNextMatch",
"shift-enter": "search::SelectPrevMatch"
},
"Editor": {
"escape": "editor::Cancel",
"backspace": "editor::Backspace",
"ctrl-h": "editor::Backspace",
"delete": "editor::Delete",
"ctrl-d": "editor::Delete",
"tab": "editor::Tab",
"shift-tab": "editor::TabPrev",
"cmd-[": "editor::Outdent",
"cmd-]": "editor::Indent",
"ctrl-shift-K": "editor::DeleteLine",
"alt-backspace": "editor::DeleteToPreviousWordStart",
"alt-h": "editor::DeleteToPreviousWordStart",
"ctrl-alt-backspace": "editor::DeleteToPreviousSubwordStart",
"ctrl-alt-h": "editor::DeleteToPreviousSubwordStart",
"alt-delete": "editor::DeleteToNextWordEnd",
"alt-d": "editor::DeleteToNextWordEnd",
"ctrl-alt-delete": "editor::DeleteToNextSubwordEnd",
"ctrl-alt-d": "editor::DeleteToNextSubwordEnd",
"cmd-backspace": "editor::DeleteToBeginningOfLine",
"cmd-delete": "editor::DeleteToEndOfLine",
"ctrl-k": "editor::CutToEndOfLine",
"cmd-shift-D": "editor::DuplicateLine",
"ctrl-cmd-up": "editor::MoveLineUp",
"ctrl-cmd-down": "editor::MoveLineDown",
"cmd-x": "editor::Cut",
"cmd-c": "editor::Copy",
"cmd-v": "editor::Paste",
"cmd-z": "editor::Undo",
"cmd-shift-Z": "editor::Redo",
"up": "editor::MoveUp",
"down": "editor::MoveDown",
"left": "editor::MoveLeft",
"right": "editor::MoveRight",
"ctrl-p": "editor::MoveUp",
"ctrl-n": "editor::MoveDown",
"ctrl-b": "editor::MoveLeft",
"ctrl-f": "editor::MoveRight",
"alt-left": "editor::MoveToPreviousWordStart",
"alt-b": "editor::MoveToPreviousWordStart",
"ctrl-alt-left": "editor::MoveToPreviousSubwordStart",
"ctrl-alt-b": "editor::MoveToPreviousSubwordStart",
"alt-right": "editor::MoveToNextWordEnd",
"alt-f": "editor::MoveToNextWordEnd",
"ctrl-alt-right": "editor::MoveToNextSubwordEnd",
"ctrl-alt-f": "editor::MoveToNextSubwordEnd",
"cmd-left": "editor::MoveToBeginningOfLine",
"ctrl-a": "editor::MoveToBeginningOfLine",
"cmd-right": "editor::MoveToEndOfLine",
"ctrl-e": "editor::MoveToEndOfLine",
"cmd-up": "editor::MoveToBeginning",
"cmd-down": "editor::MoveToEnd",
"shift-up": "editor::SelectUp",
"ctrl-shift-P": "editor::SelectUp",
"shift-down": "editor::SelectDown",
"ctrl-shift-N": "editor::SelectDown",
"shift-left": "editor::SelectLeft",
"ctrl-shift-B": "editor::SelectLeft",
"shift-right": "editor::SelectRight",
"ctrl-shift-F": "editor::SelectRight",
"alt-shift-left": "editor::SelectToPreviousWordStart",
"alt-shift-B": "editor::SelectToPreviousWordStart",
"ctrl-alt-shift-left": "editor::SelectToPreviousSubwordStart",
"ctrl-alt-shift-B": "editor::SelectToPreviousSubwordStart",
"alt-shift-right": "editor::SelectToNextWordEnd",
"alt-shift-F": "editor::SelectToNextWordEnd",
"ctrl-alt-shift-right": "editor::SelectToNextSubwordEnd",
"cmd-shift-up": "editor::SelectToBeginning",
"cmd-shift-down": "editor::SelectToEnd",
"cmd-a": "editor::SelectAll",
"cmd-l": "editor::SelectLine",
"cmd-shift-L": "editor::SplitSelectionIntoLines",
"cmd-alt-up": "editor::AddSelectionAbove",
"cmd-ctrl-p": "editor::AddSelectionAbove",
"cmd-alt-down": "editor::AddSelectionBelow",
"cmd-ctrl-n": "editor::AddSelectionBelow",
"ctrl-alt-shift-F": "editor::SelectToNextSubwordEnd",
"cmd-shift-left": [
"editor::SelectToBeginningOfLine",
{
"stop_at_soft_wraps": true
}
],
"ctrl-shift-A": [
"editor::SelectToBeginningOfLine",
{
"stop_at_soft_wraps": true
}
],
"cmd-shift-right": [
"editor::SelectToEndOfLine",
{
"stop_at_soft_wraps": true
}
],
"ctrl-shift-E": [
"editor::SelectToEndOfLine",
{
"stop_at_soft_wraps": true
}
],
"cmd-d": [
"editor::SelectNext",
{
"replace_newest": false
}
],
"cmd-k cmd-d": [
"editor::SelectNext",
{
"replace_newest": true
}
],
"cmd-/": "editor::ToggleComments",
"alt-up": "editor::SelectLargerSyntaxNode",
"ctrl-w": "editor::SelectLargerSyntaxNode",
"alt-down": "editor::SelectSmallerSyntaxNode",
"ctrl-shift-W": "editor::SelectSmallerSyntaxNode",
"cmd-u": "editor::UndoSelection",
"cmd-shift-U": "editor::RedoSelection",
"f8": "editor::GoToNextDiagnostic",
"shift-f8": "editor::GoToPrevDiagnostic",
"f2": "editor::Rename",
"f12": "editor::GoToDefinition",
"alt-shift-f12": "editor::FindAllReferences",
"ctrl-m": "editor::MoveToEnclosingBracket",
"pageup": "editor::PageUp",
"pagedown": "editor::PageDown",
"alt-cmd-[": "editor::Fold",
"alt-cmd-]": "editor::UnfoldLines",
"alt-cmd-f": "editor::FoldSelectedRanges",
"ctrl-space": "editor::ShowCompletions",
"cmd-.": "editor::ToggleCodeActions",
"alt-enter": "editor::OpenExcerpts",
"cmd-f10": "editor::RestartLanguageServer"
},
"Editor && renaming": {
"enter": "editor::ConfirmRename"
},
"Editor && showing_completions": {
"enter": "editor::ConfirmCompletion"
},
"Editor && showing_code_actions": {
"enter": "editor::ConfirmCodeAction"
},
"Editor && mode == full": {
"enter": "editor::Newline",
"cmd-f": [
"buffer_search::Deploy",
{
"focus": true
}
],
"cmd-e": [
"buffer_search::Deploy",
{
"focus": false
}
],
"cmd-shift-O": "outline::Toggle",
"ctrl-g": "go_to_line::Toggle"
},
"Editor && mode == auto_height": {
"alt-enter": [
"editor::Input",
"\n"
]
},
"OutlineView": {
"escape": "outline::Toggle"
},
"ProjectSymbolsView": {
"escape": "project_symbols::Toggle"
},
"ThemeSelector": {
"escape": "theme_selector::Toggle"
},
"GoToLine": {
"escape": "go_to_line::Toggle",
"enter": "go_to_line::Confirm"
},
"FileFinder": {
"escape": "file_finder::Toggle"
},
"ChatPanel": {
"enter": "chat_panel::Send"
},
"ProjectPanel": {
"left": "project_panel::CollapseSelectedEntry",
"right": "project_panel::ExpandSelectedEntry"
}
}

58
assets/keymaps/vim.json Normal file
View File

@ -0,0 +1,58 @@
{
"Editor && vim_mode == insert": {
"escape": "vim::NormalBefore",
"ctrl-c": "vim::NormalBefore"
},
"Editor && vim_mode == normal && vim_submode == g": {
"g": "vim::MoveToStart",
"escape": [
"vim::SwitchMode",
{
"Normal": "None"
}
]
},
"Editor && vim_mode == normal": {
"i": [
"vim::SwitchMode",
"Insert"
],
"g": [
"vim::SwitchMode",
{
"Normal": "GPrefix"
}
],
"h": "vim::MoveLeft",
"j": "vim::MoveDown",
"k": "vim::MoveUp",
"l": "vim::MoveRight",
"0": "vim::MoveToStartOfLine",
"shift-$": "vim::MoveToEndOfLine",
"shift-G": "vim::MoveToEnd",
"w": [
"vim::MoveToNextWordStart",
false
],
"shift-W": [
"vim::MoveToNextWordStart",
true
],
"e": [
"vim::MoveToNextWordEnd",
false
],
"shift-E": [
"vim::MoveToNextWordEnd",
true
],
"b": [
"vim::MoveToPreviousWordStart",
false
],
"shift-B": [
"vim::MoveToPreviousWordStart",
true
]
}
}

14
crates/assets/Cargo.toml Normal file
View File

@ -0,0 +1,14 @@
[package]
name = "assets"
version = "0.1.0"
edition = "2021"
[lib]
path = "src/assets.rs"
doctest = false
[dependencies]
gpui = { path = "../gpui" }
anyhow = "1.0.38"
rust-embed = { version = "6.3", features = ["include-exclude"] }

View File

@ -3,7 +3,7 @@ use gpui::AssetSource;
use rust_embed::RustEmbed; use rust_embed::RustEmbed;
#[derive(RustEmbed)] #[derive(RustEmbed)]
#[folder = "assets"] #[folder = "../../assets"]
#[exclude = "*.DS_Store"] #[exclude = "*.DS_Store"]
pub struct Assets; pub struct Assets;

View File

@ -6,7 +6,6 @@ use editor::Editor;
use gpui::{ use gpui::{
actions, actions,
elements::*, elements::*,
keymap::Binding,
platform::CursorStyle, platform::CursorStyle,
views::{ItemType, Select, SelectStyle}, views::{ItemType, Select, SelectStyle},
AppContext, Entity, ModelHandle, MutableAppContext, RenderContext, Subscription, Task, View, AppContext, Entity, ModelHandle, MutableAppContext, RenderContext, Subscription, Task, View,
@ -38,8 +37,6 @@ actions!(chat_panel, [Send, LoadMoreMessages]);
pub fn init(cx: &mut MutableAppContext) { pub fn init(cx: &mut MutableAppContext) {
cx.add_action(ChatPanel::send); cx.add_action(ChatPanel::send);
cx.add_action(ChatPanel::load_more_messages); cx.add_action(ChatPanel::load_more_messages);
cx.add_bindings(vec![Binding::new("enter", Send, Some("ChatPanel"))]);
} }
impl ChatPanel { impl ChatPanel {

View File

@ -1,12 +1,12 @@
[package] [package]
authors = ["Nathan Sobo <nathan@warp.dev>"] authors = ["Nathan Sobo <nathan@warp.dev>"]
default-run = "zed-server" default-run = "collab"
edition = "2021" edition = "2021"
name = "zed-server" name = "collab"
version = "0.1.0" version = "0.1.0"
[[bin]] [[bin]]
name = "zed-server" name = "collab"
[[bin]] [[bin]]
name = "seed" name = "seed"
@ -67,6 +67,7 @@ language = { path = "../language", features = ["test-support"] }
lsp = { path = "../lsp", features = ["test-support"] } lsp = { path = "../lsp", features = ["test-support"] }
project = { path = "../project", features = ["test-support"] } project = { path = "../project", features = ["test-support"] }
settings = { path = "../settings", features = ["test-support"] } settings = { path = "../settings", features = ["test-support"] }
theme = { path = "../theme" }
workspace = { path = "../workspace", features = ["test-support"] } workspace = { path = "../workspace", features = ["test-support"] }
ctor = "0.1" ctor = "0.1"
env_logger = "0.8" env_logger = "0.8"

View File

@ -1,2 +1,2 @@
web: ./target/release/zed-server collab: ./target/release/collab
release: ./target/release/sqlx migrate run release: ./target/release/sqlx migrate run

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -8,14 +8,14 @@ kind: Service
apiVersion: v1 apiVersion: v1
metadata: metadata:
namespace: ${ZED_KUBE_NAMESPACE} namespace: ${ZED_KUBE_NAMESPACE}
name: zed name: collab
annotations: annotations:
service.beta.kubernetes.io/do-loadbalancer-tls-ports: "443" service.beta.kubernetes.io/do-loadbalancer-tls-ports: "443"
service.beta.kubernetes.io/do-loadbalancer-certificate-id: "2634d353-1ab4-437f-add2-4ffd8f315233" service.beta.kubernetes.io/do-loadbalancer-certificate-id: "40879815-9a6b-4bbb-8207-8f2c7c0218f9"
spec: spec:
type: LoadBalancer type: LoadBalancer
selector: selector:
app: zed app: collab
ports: ports:
- name: web - name: web
protocol: TCP protocol: TCP
@ -26,19 +26,19 @@ apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
namespace: ${ZED_KUBE_NAMESPACE} namespace: ${ZED_KUBE_NAMESPACE}
name: zed name: collab
spec: spec:
replicas: 1 replicas: 1
selector: selector:
matchLabels: matchLabels:
app: zed app: collab
template: template:
metadata: metadata:
labels: labels:
app: zed app: collab
spec: spec:
containers: containers:
- name: zed - name: collab
image: "${ZED_IMAGE_ID}" image: "${ZED_IMAGE_ID}"
ports: ports:
- containerPort: 8080 - containerPort: 8080

View File

@ -1227,6 +1227,8 @@ mod tests {
}, },
time::Duration, time::Duration,
}; };
use theme::ThemeRegistry;
use util::TryFutureExt;
use workspace::{Item, SplitDirection, ToggleFollow, Workspace, WorkspaceParams}; use workspace::{Item, SplitDirection, ToggleFollow, Workspace, WorkspaceParams};
#[cfg(test)] #[cfg(test)]
@ -2527,7 +2529,7 @@ mod tests {
.condition(&cx_b, |editor, _| editor.context_menu_visible()) .condition(&cx_b, |editor, _| editor.context_menu_visible())
.await; .await;
editor_b.update(cx_b, |editor, cx| { editor_b.update(cx_b, |editor, cx| {
editor.confirm_completion(&ConfirmCompletion(Some(0)), cx); editor.confirm_completion(&ConfirmCompletion { item_ix: Some(0) }, cx);
assert_eq!(editor.text(cx), "fn main() { a.first_method() }"); assert_eq!(editor.text(cx), "fn main() { a.first_method() }");
}); });
@ -3716,7 +3718,12 @@ mod tests {
// Toggle code actions and wait for them to display. // Toggle code actions and wait for them to display.
editor_b.update(cx_b, |editor, cx| { editor_b.update(cx_b, |editor, cx| {
editor.toggle_code_actions(&ToggleCodeActions(false), cx); editor.toggle_code_actions(
&ToggleCodeActions {
deployed_from_indicator: false,
},
cx,
);
}); });
editor_b editor_b
.condition(&cx_b, |editor, _| editor.context_menu_visible()) .condition(&cx_b, |editor, _| editor.context_menu_visible())
@ -3727,7 +3734,7 @@ mod tests {
// Confirming the code action will trigger a resolve request. // Confirming the code action will trigger a resolve request.
let confirm_action = workspace_b let confirm_action = workspace_b
.update(cx_b, |workspace, cx| { .update(cx_b, |workspace, cx| {
Editor::confirm_code_action(workspace, &ConfirmCodeAction(Some(0)), cx) Editor::confirm_code_action(workspace, &ConfirmCodeAction { item_ix: Some(0) }, cx)
}) })
.unwrap(); .unwrap();
fake_language_server.handle_request::<lsp::request::CodeActionResolveRequest, _, _>( fake_language_server.handle_request::<lsp::request::CodeActionResolveRequest, _, _>(
@ -5829,6 +5836,7 @@ mod tests {
project: project.clone(), project: project.clone(),
user_store: self.user_store.clone(), user_store: self.user_store.clone(),
languages: self.language_registry.clone(), languages: self.language_registry.clone(),
themes: ThemeRegistry::new((), cx.font_cache().clone()),
channel_list: cx.add_model(|cx| { channel_list: cx.add_model(|cx| {
ChannelList::new(self.user_store.clone(), self.client.clone(), cx) ChannelList::new(self.user_store.clone(), self.client.clone(), cx)
}), }),

Some files were not shown because too many files have changed in this diff Show More