aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/document.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-view/src/document.rs')
-rw-r--r--helix-view/src/document.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs
index 569e72ee..3f3f620f 100644
--- a/helix-view/src/document.rs
+++ b/helix-view/src/document.rs
@@ -140,10 +140,12 @@ impl Document {
// TODO: this ties lsp support to tree-sitter enabled languages for now. Language
// config should use Option<HighlightConfig> to let us have non-tree-sitter configs.
- let highlight_config = language_config.highlight_config(scopes).unwrap().unwrap();
+ let highlight_config = language_config
+ .highlight_config(scopes)
+ .expect("No highlight_config found!");
// TODO: config.configure(scopes) is now delayed, is that ok?
- let syntax = Syntax::new(&self.state.doc, highlight_config.clone());
+ let syntax = Syntax::new(&self.state.doc, highlight_config);
self.syntax = Some(syntax);
} else {