diff options
author | Michael Davis | 2022-10-16 19:59:57 +0000 |
---|---|---|
committer | GitHub | 2022-10-16 19:59:57 +0000 |
commit | 50b191a7dff4a6c311437d3e5fcd1ce36b300643 (patch) | |
tree | 21628e9ba5fa161da9ac44354d457dc48ceda60c /helix-core/src/syntax.rs | |
parent | 5f4f171b73232e5ec5e4b7153084a93033ab5cf0 (diff) |
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.
Diffstat (limited to 'helix-core/src/syntax.rs')
-rw-r--r-- | helix-core/src/syntax.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs index 8c51d5eb..61d382fd 100644 --- a/helix-core/src/syntax.rs +++ b/helix-core/src/syntax.rs @@ -368,7 +368,13 @@ impl LanguageConfiguration { None } else { 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()?; let config = HighlightConfiguration::new( language, |