config: send server-side capabilities to config
This commit is contained in:
parent
c235f026f0
commit
27f30f8d28
5 changed files with 26 additions and 2 deletions
|
|
@ -4,7 +4,9 @@ use {
|
|||
crate::{
|
||||
_private::{
|
||||
bincode_ops,
|
||||
ipc::{ClientMessage, InitMessage, Response, ServerMessage, WorkspaceSource},
|
||||
ipc::{
|
||||
ClientMessage, InitMessage, Response, ServerFeature, ServerMessage, WorkspaceSource,
|
||||
},
|
||||
logging, Config, ConfigEntry, ConfigEntryGen, PollableId, WireMode, VERSION,
|
||||
},
|
||||
exec::Command,
|
||||
|
|
@ -1178,6 +1180,14 @@ impl Client {
|
|||
}
|
||||
}
|
||||
}
|
||||
ServerMessage::Features { features } => {
|
||||
for feat in features {
|
||||
match feat {
|
||||
ServerFeature::NONE => {}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,14 @@ use {
|
|||
std::time::Duration,
|
||||
};
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Eq, PartialEq)]
|
||||
#[serde(transparent)]
|
||||
pub struct ServerFeature(u16);
|
||||
|
||||
impl ServerFeature {
|
||||
pub const NONE: Self = Self(0);
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub enum ServerMessage {
|
||||
Configure {
|
||||
|
|
@ -62,6 +70,9 @@ pub enum ServerMessage {
|
|||
writable: bool,
|
||||
res: Result<(), String>,
|
||||
},
|
||||
Features {
|
||||
features: Vec<ServerFeature>,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
|
|
|
|||
|
|
@ -38,7 +38,8 @@
|
|||
clippy::uninlined_format_args,
|
||||
clippy::len_zero,
|
||||
clippy::single_char_pattern,
|
||||
clippy::single_char_add_str
|
||||
clippy::single_char_add_str,
|
||||
clippy::single_match
|
||||
)]
|
||||
|
||||
use {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue