🎨 Move OpenSettings action back to the zed crate

This commit is contained in:
Max Brunsfeld 2023-06-05 15:02:29 -07:00
parent 398b0f303c
commit 0949ee84d8
4 changed files with 15 additions and 20 deletions

View file

@ -65,6 +65,7 @@ actions!(
OpenLicenses,
OpenTelemetryLog,
OpenKeymap,
OpenSettings,
OpenDefaultSettings,
OpenDefaultKeymap,
IncreaseBufferFontSize,
@ -157,6 +158,16 @@ pub fn init(app_state: &Arc<AppState>, cx: &mut gpui::AppContext) {
create_and_open_local_file(&paths::KEYMAP, cx, Default::default).detach_and_log_err(cx);
},
);
cx.add_action(
move |_: &mut Workspace, _: &OpenSettings, cx: &mut ViewContext<Workspace>| {
create_and_open_local_file(&paths::SETTINGS, cx, || {
settings::initial_user_settings_content(&Assets)
.as_ref()
.into()
})
.detach_and_log_err(cx);
},
);
cx.add_action(
move |workspace: &mut Workspace, _: &OpenDefaultKeymap, cx: &mut ViewContext<Workspace>| {
open_bundled_file(