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, 6 insertions, 0 deletions
diff --git a/xtask/src/helpers.rs b/xtask/src/helpers.rs
index 0156f253..f96cdfb3 100644
--- a/xtask/src/helpers.rs
+++ b/xtask/src/helpers.rs
@@ -1,6 +1,7 @@
use std::path::{Path, PathBuf};
use crate::path;
+use helix_core::syntax::Configuration as LangConfig;
use helix_term::health::TsFeature;
/// Get the list of languages that support a particular tree-sitter
@@ -36,3 +37,8 @@ pub fn find_files(dir: &Path, filename: &str) -> Vec<PathBuf> {
.flatten()
.collect()
}
+
+pub fn lang_config() -> LangConfig {
+ let text = std::fs::read_to_string(path::lang_config()).unwrap();
+ toml::from_str(&text).unwrap()
+}