Skip to content

Commit

Permalink
minor: Silence noisy language server not found error in log
Browse files Browse the repository at this point in the history
  • Loading branch information
archseer committed Jan 24, 2024
1 parent cb25d13 commit 83f09ec
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions helix-view/src/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
})
Expand Down

0 comments on commit 83f09ec

Please sign in to comment.