From df1a117c5ca3fb90d160c96441a300458aafd189 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Hrastnik?= Date: Wed, 24 Jan 2024 16:00:21 +0900 Subject: [PATCH] minor: Silence noisy language server not found error in log --- helix-view/src/editor.rs | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index f605cbb5f9c6..eca488e74002 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -1238,12 +1238,19 @@ impl Editor { .filter_map(|(lang, client)| match client { Ok(client) => Some((lang, client)), Err(err) => { - log::error!( - "Failed to initialize the language servers for `{}` - `{}` {{ {} }}", - language.scope(), - lang, - err - ); + if let helix_lsp::Error::ExecutableNotFound(err) = err { + // Silence by default since some language servers might just not be installed + log::debug!( + "Language server not found for `{}` {} {}", language.scope(), lang, err, + ); + } else { + log::error!( + "Failed to initialize the language servers for `{}` - `{}` {{ {} }}", + language.scope(), + lang, + err + ); + } None } })