Revert "settings: Remove auxiliary Content types where possible (#16744)" (#17768)

This breaks setting `{"scrollbar": {"show":"never"}}`
Release Notes:

- N/A
This commit is contained in:
Conrad Irwin 2024-09-12 14:46:08 -04:00 committed by GitHub
parent 3b37db4140
commit 4d26f83d23
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
49 changed files with 686 additions and 833 deletions

View file

@ -22,24 +22,8 @@ use ui::{
use util::paths::PathWithPosition;
use workspace::{AppState, ModalView, Workspace};
#[derive(Clone, Default, Serialize, Deserialize, JsonSchema)]
#[serde(default)]
#[derive(Deserialize)]
pub struct SshSettings {
/// ssh_connections is an array of ssh connections.
/// By default this setting is null, which disables the direct ssh connection support.
/// You can configure these from `project: Open Remote` in the command palette.
/// Zed's ssh support will pull configuration from your ~/.ssh too.
/// Examples:
/// [
/// {
/// "host": "example-box",
/// "projects": [
/// {
/// "paths": ["/home/user/code/zed"]
/// }
/// ]
/// }
/// ]
pub ssh_connections: Option<Vec<SshConnection>>,
}
@ -78,10 +62,15 @@ pub struct SshProject {
pub paths: Vec<String>,
}
#[derive(Clone, Default, Serialize, Deserialize, JsonSchema)]
pub struct RemoteSettingsContent {
pub ssh_connections: Option<Vec<SshConnection>>,
}
impl Settings for SshSettings {
const KEY: Option<&'static str> = None;
type FileContent = Self;
type FileContent = RemoteSettingsContent;
fn load(sources: SettingsSources<Self::FileContent>, _: &mut AppContext) -> Result<Self> {
sources.json_merge()