This breaks setting `{"scrollbar": {"show":"never"}}`
Release Notes:
- N/A
This commit is contained in:
@@ -48,6 +48,7 @@ use workspace::{notifications::DetachAndPromptErr, AppState, ModalView, Workspac
|
||||
use crate::open_dev_server_project;
|
||||
use crate::ssh_connections::connect_over_ssh;
|
||||
use crate::ssh_connections::open_ssh_project;
|
||||
use crate::ssh_connections::RemoteSettingsContent;
|
||||
use crate::ssh_connections::SshConnection;
|
||||
use crate::ssh_connections::SshConnectionModal;
|
||||
use crate::ssh_connections::SshProject;
|
||||
@@ -1023,7 +1024,7 @@ impl DevServerProjects {
|
||||
fn update_settings_file(
|
||||
&mut self,
|
||||
cx: &mut ViewContext<Self>,
|
||||
f: impl FnOnce(&mut SshSettings) + Send + Sync + 'static,
|
||||
f: impl FnOnce(&mut RemoteSettingsContent) + Send + Sync + 'static,
|
||||
) {
|
||||
let Some(fs) = self
|
||||
.workspace
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user