Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'xtask/src/helpers.rs')
-rw-r--r--xtask/src/helpers.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/xtask/src/helpers.rs b/xtask/src/helpers.rs
index d2c955bc..9bdca561 100644
--- a/xtask/src/helpers.rs
+++ b/xtask/src/helpers.rs
@@ -1,7 +1,7 @@
use std::path::{Path, PathBuf};
use crate::path;
-use helix_core::syntax::config::Configuration as LangConfig;
+use helix_core::syntax::{self, config::Configuration as LangConfig};
use helix_term::health::TsFeature;
/// Get the list of languages that support a particular tree-sitter
@@ -42,3 +42,7 @@ pub fn lang_config() -> LangConfig {
let text = std::fs::read_to_string(path::lang_config()).unwrap();
toml::from_str(&text).unwrap()
}
+
+pub fn syn_loader() -> syntax::Loader {
+ syntax::Loader::new(lang_config()).unwrap()
+}