Avoid copying all default settings to initial user settings
This would cause top-level default editor settings to override language-specific default settings. Co-authored-by: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
48624b796e
commit
8292ba15ed
2 changed files with 11 additions and 8 deletions
|
@ -6,3 +6,6 @@
|
|||
// To see all of Zed's default settings without changing your
|
||||
// custom settings, run the `open default settings` command
|
||||
// from the command palette or from `Zed` application menu.
|
||||
{
|
||||
"buffer_font_size": 15
|
||||
}
|
|
@ -102,14 +102,14 @@ pub fn init(app_state: &Arc<AppState>, cx: &mut gpui::MutableAppContext) {
|
|||
let app_state = app_state.clone();
|
||||
move |_: &mut Workspace, _: &OpenSettings, cx: &mut ViewContext<Workspace>| {
|
||||
open_config_file(&SETTINGS_PATH, app_state.clone(), cx, || {
|
||||
let header = Assets.load("settings/header-comments.json").unwrap();
|
||||
let json = Assets.load("settings/default.json").unwrap();
|
||||
let header = str::from_utf8(header.as_ref()).unwrap();
|
||||
let json = str::from_utf8(json.as_ref()).unwrap();
|
||||
let mut content = Rope::new();
|
||||
content.push(header);
|
||||
content.push(json);
|
||||
content
|
||||
str::from_utf8(
|
||||
Assets
|
||||
.load("settings/initial_user_settings.json")
|
||||
.unwrap()
|
||||
.as_ref(),
|
||||
)
|
||||
.unwrap()
|
||||
.into()
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue