mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-26 03:13:29 +04:00
Log failures to load tree-sitter parsers as error (#4315)
Info logs don't show up in the log file by default, but this line should: failures to load tree-sitter parser objects are useful errors. A parser might fail to load it is misconfigured (https://github.com/helix-editor/helix/pull/4303#discussion_r996448543) or if the file does not exist.
This commit is contained in:
parent
5f4f171b73
commit
50b191a7df
@ -368,7 +368,13 @@ fn initialize_highlight(&self, scopes: &[String]) -> Option<Arc<HighlightConfigu
|
|||||||
None
|
None
|
||||||
} else {
|
} else {
|
||||||
let language = get_language(self.grammar.as_deref().unwrap_or(&self.language_id))
|
let language = get_language(self.grammar.as_deref().unwrap_or(&self.language_id))
|
||||||
.map_err(|e| log::info!("{}", e))
|
.map_err(|err| {
|
||||||
|
log::error!(
|
||||||
|
"Failed to load tree-sitter parser for language {:?}: {}",
|
||||||
|
self.language_id,
|
||||||
|
err
|
||||||
|
)
|
||||||
|
})
|
||||||
.ok()?;
|
.ok()?;
|
||||||
let config = HighlightConfiguration::new(
|
let config = HighlightConfiguration::new(
|
||||||
language,
|
language,
|
||||||
|
Loading…
Reference in New Issue
Block a user