mirror of
https://github.com/helix-editor/helix.git
synced 2025-04-06 04:17:43 +03:00
Merge branch 'master' into debug
This commit is contained in:
commit
0a6b60085a
31 changed files with 846 additions and 117 deletions
|
@ -31,6 +31,15 @@ where
|
|||
.transpose()
|
||||
}
|
||||
|
||||
fn deserialize_lsp_config<'de, D>(deserializer: D) -> Result<Option<serde_json::Value>, D::Error>
|
||||
where
|
||||
D: serde::Deserializer<'de>,
|
||||
{
|
||||
Option::<toml::Value>::deserialize(deserializer)?
|
||||
.map(|toml| toml.try_into().map_err(serde::de::Error::custom))
|
||||
.transpose()
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct Configuration {
|
||||
pub language: Vec<LanguageConfiguration>,
|
||||
|
@ -46,7 +55,9 @@ pub struct LanguageConfiguration {
|
|||
pub file_types: Vec<String>, // filename ends_with? <Gemfile, rb, etc>
|
||||
pub roots: Vec<String>, // these indicate project roots <.git, Cargo.toml>
|
||||
pub comment_token: Option<String>,
|
||||
pub config: Option<String>,
|
||||
|
||||
#[serde(default, skip_serializing, deserialize_with = "deserialize_lsp_config")]
|
||||
pub config: Option<serde_json::Value>,
|
||||
|
||||
#[serde(default)]
|
||||
pub auto_format: bool,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue