VSCode settings import refactor (#40513)
A small follow-up to the settings refactor of a few weeks ago to move all the VSCode settings imports to one place. This should make it easier to spot missing imports, and easier to test the importer. Release Notes: - N/A
This commit is contained in:
@@ -2,7 +2,7 @@ use editor::EditorSettings;
|
||||
use gpui::Pixels;
|
||||
use schemars::JsonSchema;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use settings::{Settings, SettingsContent, StatusStyle};
|
||||
use settings::{Settings, StatusStyle};
|
||||
use ui::{
|
||||
px,
|
||||
scrollbars::{ScrollbarVisibility, ShowScrollbar},
|
||||
@@ -58,16 +58,4 @@ impl Settings for GitPanelSettings {
|
||||
collapse_untracked_diff: git_panel.collapse_untracked_diff.unwrap(),
|
||||
}
|
||||
}
|
||||
|
||||
fn import_from_vscode(vscode: &settings::VsCodeSettings, current: &mut SettingsContent) {
|
||||
if let Some(git_enabled) = vscode.read_bool("git.enabled") {
|
||||
current.git_panel.get_or_insert_default().button = Some(git_enabled);
|
||||
}
|
||||
if let Some(default_branch) = vscode.read_string("git.defaultBranchName") {
|
||||
current
|
||||
.git_panel
|
||||
.get_or_insert_default()
|
||||
.fallback_branch_name = Some(default_branch.to_string());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user