aboutsummaryrefslogtreecommitdiff
path: root/helix-core
diff options
context:
space:
mode:
authorEmmChriss2022-05-11 00:54:35 +0000
committerGitHub2022-05-11 00:54:35 +0000
commit807cdc60bf060bdbff95c2ab44c4f2ce0cf66e83 (patch)
tree51021f6385ba99c67ea682cd0687eb1a23f5979c /helix-core
parent247ab25bc04b75fede667bc2736c8449e8608714 (diff)
configurable lsp request timeout (#2405)
Diffstat (limited to 'helix-core')
-rw-r--r--helix-core/src/syntax.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs
index 9208f0e8..b20d9092 100644
--- a/helix-core/src/syntax.rs
+++ b/helix-core/src/syntax.rs
@@ -50,6 +50,10 @@ where
Ok(Option::<AutoPairConfig>::deserialize(deserializer)?.and_then(AutoPairConfig::into))
}
+fn default_timeout() -> u64 {
+ 20
+}
+
#[derive(Debug, Serialize, Deserialize)]
pub struct Configuration {
pub language: Vec<LanguageConfiguration>,
@@ -116,6 +120,8 @@ pub struct LanguageServerConfiguration {
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub args: Vec<String>,
+ #[serde(default = "default_timeout")]
+ pub timeout: u64,
pub language_id: Option<String>,
}