aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/indent.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-core/src/indent.rs')
-rw-r--r--helix-core/src/indent.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/helix-core/src/indent.rs b/helix-core/src/indent.rs
index 23b21ed3..ca042172 100644
--- a/helix-core/src/indent.rs
+++ b/helix-core/src/indent.rs
@@ -289,6 +289,11 @@ where
}],
});
+ // set runtime path so we can find the queries
+ let mut runtime = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR"));
+ runtime.push("../runtime");
+ std::env::set_var("HELIX_RUNTIME", runtime.to_str().unwrap());
+
let language_config = loader.language_config_for_scope("source.rust").unwrap();
let highlight_config = language_config.highlight_config(&[]).unwrap();
let syntax = Syntax::new(&doc, highlight_config.clone());