From eb639eb2e4610ed2b440c8d95217f125005288fd Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Tue, 22 Sep 2020 18:23:48 +0900 Subject: More robust syntax detection/grammar loading. --- helix-view/src/view.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'helix-view/src') diff --git a/helix-view/src/view.rs b/helix-view/src/view.rs index 3f7a9974..0900b0ca 100644 --- a/helix-view/src/view.rs +++ b/helix-view/src/view.rs @@ -14,9 +14,8 @@ pub struct View { impl View { pub fn open(path: PathBuf, size: (u16, u16)) -> Result { - let mut state = State::load(path)?; let theme = Theme::default(); - state.syntax.as_mut().unwrap().configure(theme.scopes()); + let state = State::load(path, theme.scopes())?; let view = View { state, -- cgit v1.2.3-70-g09d2