aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src
diff options
context:
space:
mode:
authorKirawi2021-09-15 05:58:06 +0000
committerGitHub2021-09-15 05:58:06 +0000
commitef532e0c0df3e9f8bf4ac5af74b54f32b7ea2728 (patch)
tree932c976e224d9b345c5c7e9c141fc40b8b636d3b /helix-view/src
parent51b7f40da1e564d9ecb5263421306d5846d98566 (diff)
log errors produced when trying to initialize the LSP (#746)
Diffstat (limited to 'helix-view/src')
-rw-r--r--helix-view/src/editor.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs
index 52a0060c..a3d0d032 100644
--- a/helix-view/src/editor.rs
+++ b/helix-view/src/editor.rs
@@ -249,10 +249,14 @@ impl Editor {
let mut doc = Document::open(&path, None, Some(&self.theme), Some(&self.syn_loader))?;
// try to find a language server based on the language name
- let language_server = doc
- .language
- .as_ref()
- .and_then(|language| self.language_servers.get(language).ok());
+ let language_server = doc.language.as_ref().and_then(|language| {
+ self.language_servers
+ .get(language)
+ .map_err(|e| {
+ log::error!("Failed to get LSP, {}, for `{}`", e, language.scope())
+ })
+ .ok()
+ });
if let Some(language_server) = language_server {
let language_id = doc