aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src
diff options
context:
space:
mode:
authorBlaž Hrastnik2020-09-22 09:23:48 +0000
committerBlaž Hrastnik2020-09-22 09:27:37 +0000
commiteb639eb2e4610ed2b440c8d95217f125005288fd (patch)
tree3dd5d220287a4927f9dc79689d0e9dacb4021b73 /helix-view/src
parent2c3b10dbb0f270bc83169d28e4ed665557be70ca (diff)
More robust syntax detection/grammar loading.
Diffstat (limited to 'helix-view/src')
-rw-r--r--helix-view/src/view.rs3
1 files changed, 1 insertions, 2 deletions
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<View, Error> {
- 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,