Introducing multibuffers (#14668)

Co-Authored-By: Marshall <marshall@zed.dev>

Release Notes:

- Added a hint the first few times you open a multibuffer to explain
what is going on.

Co-authored-by: Marshall <marshall@zed.dev>
This commit is contained in:
Conrad Irwin 2024-07-17 11:54:52 -06:00 committed by GitHub
parent 53bcc3649a
commit 4852e170ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 180 additions and 4 deletions

View file

@ -1,12 +1,13 @@
mod base_keymap_picker;
mod base_keymap_setting;
mod multibuffer_hint;
use client::{telemetry::Telemetry, TelemetrySettings};
use db::kvp::KEY_VALUE_STORE;
use gpui::{
svg, AnyElement, AppContext, EventEmitter, FocusHandle, FocusableView, InteractiveElement,
ParentElement, Render, Styled, Subscription, Task, View, ViewContext, VisualContext, WeakView,
WindowContext,
actions, svg, AnyElement, AppContext, EventEmitter, FocusHandle, FocusableView,
InteractiveElement, ParentElement, Render, Styled, Subscription, Task, View, ViewContext,
VisualContext, WeakView, WindowContext,
};
use settings::{Settings, SettingsStore};
use std::sync::Arc;
@ -19,6 +20,9 @@ use workspace::{
};
pub use base_keymap_setting::BaseKeymap;
pub use multibuffer_hint::*;
actions!(welcome, [ResetHints]);
pub const FIRST_OPEN: &str = "first_open";
@ -30,6 +34,8 @@ pub fn init(cx: &mut AppContext) {
let welcome_page = WelcomePage::new(workspace, cx);
workspace.add_item_to_active_pane(Box::new(welcome_page), None, cx)
});
workspace
.register_action(|_workspace, _: &ResetHints, cx| MultibufferHint::set_count(0, cx));
})
.detach();