migrator: In-memory migration and improved UX (#24621)

This PR adds:

- Support for deprecated keymap and settings (In-memory migration)
- Migration prompt only shown in `settings.json` / `keymap.json`.

Release Notes:

- The migration banner will only appear in `settings.json` and
`keymap.json` if you have deprecated settings or keybindings, allowing
you to migrate them to work with the new version on Zed.
This commit is contained in:
smit 2025-02-12 06:47:08 +05:30 committed by GitHub
parent 498bb518ff
commit 65934ae181
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 375 additions and 196 deletions

View file

@ -34,7 +34,7 @@ use project::project_settings::ProjectSettings;
use recent_projects::{open_ssh_project, SshSettings};
use release_channel::{AppCommitSha, AppVersion, ReleaseChannel};
use session::{AppSession, Session};
use settings::{handle_settings_file_changes, watch_config_file, Settings, SettingsStore};
use settings::{watch_config_file, Settings, SettingsStore};
use simplelog::ConfigBuilder;
use std::{
env,
@ -52,8 +52,9 @@ use welcome::{show_welcome_view, BaseKeymap, FIRST_OPEN};
use workspace::{AppState, SerializedWorkspaceLocation, WorkspaceSettings, WorkspaceStore};
use zed::{
app_menus, build_window_options, derive_paths_with_position, handle_cli_connection,
handle_keymap_file_changes, handle_settings_changed, initialize_workspace,
inline_completion_registry, open_paths_with_positions, OpenListener, OpenRequest,
handle_keymap_file_changes, handle_settings_changed, handle_settings_file_changes,
initialize_workspace, inline_completion_registry, open_paths_with_positions, OpenListener,
OpenRequest,
};
#[cfg(unix)]