From 1caba2d3e8e16752d7d659b58c51931451a1cb47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Hrastnik?= Date: Sat, 3 Sep 2022 12:18:08 +0900 Subject: [PATCH] lsp: Don't log "LSP not defined" errors in the logfile --- helix-lsp/src/lib.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/helix-lsp/src/lib.rs b/helix-lsp/src/lib.rs index 79d9609e1..516c93ca1 100644 --- a/helix-lsp/src/lib.rs +++ b/helix-lsp/src/lib.rs @@ -356,7 +356,11 @@ impl Registry { .await; if let Err(e) = value { - log::error!("failed to initialize language server: {}", e); + if let Error::LspNotDefined = e { + // Skip logging "lsp not defined" + } else { + log::error!("failed to initialize language server: {}", e); + } return; }