From 807cdc60bf060bdbff95c2ab44c4f2ce0cf66e83 Mon Sep 17 00:00:00 2001 From: EmmChriss Date: Wed, 11 May 2022 03:54:35 +0300 Subject: configurable lsp request timeout (#2405) --- helix-core/src/syntax.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'helix-core/src/syntax.rs') 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::::deserialize(deserializer)?.and_then(AutoPairConfig::into)) } +fn default_timeout() -> u64 { + 20 +} + #[derive(Debug, Serialize, Deserialize)] pub struct Configuration { pub language: Vec, @@ -116,6 +120,8 @@ pub struct LanguageServerConfiguration { #[serde(default)] #[serde(skip_serializing_if = "Vec::is_empty")] pub args: Vec, + #[serde(default = "default_timeout")] + pub timeout: u64, pub language_id: Option, } -- cgit v1.2.3-70-g09d2