Skip to content

Commit 8defc30

Browse files
the-mikedavisShekhinah Memmel
authored and
Shekhinah Memmel
committed
Log failures to load tree-sitter parsers as error (helix-editor#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 (helix-editor#4303 (comment)) or if the file does not exist.
1 parent 1519ab6 commit 8defc30

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

helix-core/src/syntax.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,13 @@ impl LanguageConfiguration {
368368
None
369369
} else {
370370
let language = get_language(self.grammar.as_deref().unwrap_or(&self.language_id))
371-
.map_err(|e| log::info!("{}", e))
371+
.map_err(|err| {
372+
log::error!(
373+
"Failed to load tree-sitter parser for language {:?}: {}",
374+
self.language_id,
375+
err
376+
)
377+
})
372378
.ok()?;
373379
let config = HighlightConfiguration::new(
374380
language,

0 commit comments

Comments
 (0)