settings: Remove auxiliary Content types where possible (#16744)
Release Notes: - N/A
This commit is contained in:
parent
8f28445612
commit
ccf6f27b8f
49 changed files with 843 additions and 696 deletions
|
@ -22,8 +22,24 @@ use ui::{
|
|||
use util::paths::PathWithPosition;
|
||||
use workspace::{AppState, ModalView, Workspace};
|
||||
|
||||
#[derive(Deserialize)]
|
||||
#[derive(Clone, Default, Serialize, Deserialize, JsonSchema)]
|
||||
#[serde(default)]
|
||||
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>>,
|
||||
}
|
||||
|
||||
|
@ -62,15 +78,10 @@ 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 = RemoteSettingsContent;
|
||||
type FileContent = Self;
|
||||
|
||||
fn load(sources: SettingsSources<Self::FileContent>, _: &mut AppContext) -> Result<Self> {
|
||||
sources.json_merge()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue