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:
Conrad Irwin
2025-10-17 17:47:05 +00:00
committed by GitHub
parent 62858f6a5c
commit 1fbe1e3512
19 changed files with 774 additions and 924 deletions
+1 -13
View File
@@ -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());
}
}
}