Skip to content

Commit 951132f

Browse files
authored
chore: Fix build graph - again (#42999)
11.3s -> 10.0s for silly stuff like extracting actions from crates. project panel still depends on git_ui though.. Release Notes: - N/A
1 parent bf0dd40 commit 951132f

File tree

9 files changed

+29
-13
lines changed

9 files changed

+29
-13
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/keymap_editor/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ tree-sitter-rust.workspace = true
4141
ui_input.workspace = true
4242
ui.workspace = true
4343
util.workspace = true
44-
vim.workspace = true
4544
workspace.workspace = true
4645
zed_actions.workspace = true
4746

crates/keymap_editor/src/keymap_editor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1769,7 +1769,7 @@ impl Render for KeymapEditor {
17691769
)
17701770
.action(
17711771
"Vim Bindings",
1772-
vim::OpenDefaultKeymap.boxed_clone(),
1772+
zed_actions::vim::OpenDefaultKeymap.boxed_clone(),
17731773
)
17741774
}))
17751775
})

crates/project_panel/src/project_panel.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ use workspace::{
6767
notifications::{DetachAndPromptErr, NotifyResultExt, NotifyTaskExt},
6868
};
6969
use worktree::CreatedEntry;
70-
use zed_actions::workspace::OpenWithSystem;
70+
use zed_actions::{project_panel::ToggleFocus, workspace::OpenWithSystem};
7171

7272
const PROJECT_PANEL_KEY: &str = "ProjectPanel";
7373
const NEW_ENTRY_ID: ProjectEntryId = ProjectEntryId::MAX;
@@ -306,8 +306,6 @@ actions!(
306306
OpenSplitVertical,
307307
/// Opens the selected file in a horizontal split.
308308
OpenSplitHorizontal,
309-
/// Toggles focus on the project panel.
310-
ToggleFocus,
311309
/// Toggles visibility of git-ignored files.
312310
ToggleHideGitIgnore,
313311
/// Toggles visibility of hidden files.

crates/vim/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ multi_buffer.workspace = true
3535
nvim-rs = { git = "https://github.com/KillTheMule/nvim-rs", rev = "764dd270c642f77f10f3e19d05cc178a6cbe69f3", features = ["use_tokio"], optional = true }
3636
picker.workspace = true
3737
project.workspace = true
38-
project_panel.workspace = true
3938
regex.workspace = true
4039
schemars.workspace = true
4140
search.workspace = true

crates/vim/src/vim.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,6 @@ actions!(
183183
InnerObject,
184184
/// Maximizes the current pane.
185185
MaximizePane,
186-
/// Opens the default keymap file.
187-
OpenDefaultKeymap,
188186
/// Resets all pane sizes to default.
189187
ResetPaneSizes,
190188
/// Resizes the pane to the right.
@@ -314,7 +312,7 @@ pub fn init(cx: &mut App) {
314312

315313
workspace.register_action(|_, _: &ToggleProjectPanelFocus, window, cx| {
316314
if Vim::take_count(cx).is_none() {
317-
window.dispatch_action(project_panel::ToggleFocus.boxed_clone(), cx);
315+
window.dispatch_action(zed_actions::project_panel::ToggleFocus.boxed_clone(), cx);
318316
}
319317
});
320318

@@ -343,7 +341,7 @@ pub fn init(cx: &mut App) {
343341
};
344342
});
345343

346-
workspace.register_action(|_, _: &OpenDefaultKeymap, _, cx| {
344+
workspace.register_action(|_, _: &zed_actions::vim::OpenDefaultKeymap, _, cx| {
347345
cx.emit(workspace::Event::OpenBundledFile {
348346
text: settings::vim_keymap(),
349347
title: "Default Vim Bindings",

crates/zed/src/zed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1002,7 +1002,7 @@ fn register_actions(
10021002
.register_action(open_project_debug_tasks_file)
10031003
.register_action(
10041004
|workspace: &mut Workspace,
1005-
_: &project_panel::ToggleFocus,
1005+
_: &zed_actions::project_panel::ToggleFocus,
10061006
window: &mut Window,
10071007
cx: &mut Context<Workspace>| {
10081008
workspace.toggle_panel_focus::<ProjectPanel>(window, cx);

crates/zed/src/zed/app_menus.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ pub fn app_menus(cx: &mut App) -> Vec<Menu> {
3939
],
4040
}),
4141
MenuItem::separator(),
42-
MenuItem::action("Project Panel", project_panel::ToggleFocus),
42+
MenuItem::action("Project Panel", zed_actions::project_panel::ToggleFocus),
4343
MenuItem::action("Outline Panel", outline_panel::ToggleFocus),
4444
MenuItem::action("Collab Panel", collab_panel::ToggleFocus),
4545
MenuItem::action("Terminal Panel", terminal_panel::ToggleFocus),

crates/zed_actions/src/lib.rs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,17 @@ pub mod command_palette {
250250
);
251251
}
252252

253+
pub mod project_panel {
254+
use gpui::actions;
255+
256+
actions!(
257+
project_panel,
258+
[
259+
/// Toggles focus on the project panel.
260+
ToggleFocus
261+
]
262+
);
263+
}
253264
pub mod feedback {
254265
use gpui::actions;
255266

@@ -532,6 +543,18 @@ actions!(
532543
]
533544
);
534545

546+
pub mod vim {
547+
use gpui::actions;
548+
549+
actions!(
550+
vim,
551+
[
552+
/// Opens the default keymap file.
553+
OpenDefaultKeymap
554+
]
555+
);
556+
}
557+
535558
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
536559
pub struct WslConnectionOptions {
537560
pub distro_name: String,

0 commit comments

Comments
 (0)