Refactor SearchSettings (#17550)
Related to #17179. Simplify handling of search settings since there is no requirement to watch for settings.json changes and update search panels while they are opened. Attn: @SomeoneToIgnore Per our discussion. Ran test on search crate. Ran `cargo fmt`. Release Notes: - N/A
This commit is contained in:
@@ -171,27 +171,6 @@ pub struct SearchSettings {
|
||||
pub regex: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone, Default, Serialize, Deserialize, JsonSchema, Debug)]
|
||||
pub struct SearchSettingsContent {
|
||||
pub whole_word: Option<bool>,
|
||||
pub case_sensitive: Option<bool>,
|
||||
pub include_ignored: Option<bool>,
|
||||
pub regex: Option<bool>,
|
||||
}
|
||||
|
||||
impl Settings for SearchSettings {
|
||||
const KEY: Option<&'static str> = Some("search");
|
||||
|
||||
type FileContent = SearchSettingsContent;
|
||||
|
||||
fn load(
|
||||
sources: SettingsSources<Self::FileContent>,
|
||||
_: &mut gpui::AppContext,
|
||||
) -> anyhow::Result<Self> {
|
||||
sources.json_merge()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Default, Serialize, Deserialize, JsonSchema)]
|
||||
pub struct EditorSettingsContent {
|
||||
/// Whether the cursor blinks in the editor.
|
||||
|
||||
Reference in New Issue
Block a user