aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/document.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-02-24 07:07:39 +0000
committerBlaž Hrastnik2021-02-24 07:07:39 +0000
commit87a6d4e73615e17559b99afa065799a38fe6c39e (patch)
tree23e437304421ec88a355e3ef887cf6cb4a322591 /helix-view/src/document.rs
parentc6456d04b9f16ed8f5ad0f256a38218b514de5dc (diff)
minor: Simplify some code.
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 {