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 authored and dgkf committed Jan 30, 2024
1 parent e856b6f commit ae84537
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 ae84537

Please sign in to comment.