Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--helix-core/src/syntax.rs2
-rw-r--r--xtask/src/docgen.rs2
-rw-r--r--xtask/src/helpers.rs10
-rw-r--r--xtask/src/main.rs2
-rw-r--r--xtask/src/path.rs4
5 files changed, 3 insertions, 17 deletions
diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs
index 57b9e5c3..ac689eb3 100644
--- a/helix-core/src/syntax.rs
+++ b/helix-core/src/syntax.rs
@@ -964,7 +964,7 @@ mod test {
use super::*;
use crate::{Rope, Transaction};
- static LOADER: Lazy<Loader> = Lazy::new(|| crate::config::user_lang_loader().unwrap());
+ static LOADER: Lazy<Loader> = Lazy::new(crate::config::default_lang_loader);
#[test]
fn test_textobject_queries() {
diff --git a/xtask/src/docgen.rs b/xtask/src/docgen.rs
index 2b58e732..d31c396d 100644
--- a/xtask/src/docgen.rs
+++ b/xtask/src/docgen.rs
@@ -129,7 +129,7 @@ pub fn lang_features() -> Result<String, DynError> {
cols.push("Default language servers".to_owned());
md.push_str(&md_table_heading(&cols));
- let config = helpers::lang_config();
+ let config = helix_core::config::default_lang_config();
let mut langs = config
.language
diff --git a/xtask/src/helpers.rs b/xtask/src/helpers.rs
index 9bdca561..0156f253 100644
--- a/xtask/src/helpers.rs
+++ b/xtask/src/helpers.rs
@@ -1,7 +1,6 @@
use std::path::{Path, PathBuf};
use crate::path;
-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
@@ -37,12 +36,3 @@ 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()
-}
-
-pub fn syn_loader() -> syntax::Loader {
- syntax::Loader::new(lang_config()).unwrap()
-}
diff --git a/xtask/src/main.rs b/xtask/src/main.rs
index c6875d95..d4995ce3 100644
--- a/xtask/src/main.rs
+++ b/xtask/src/main.rs
@@ -22,7 +22,7 @@ pub mod tasks {
use helix_core::syntax::LanguageData;
let languages_to_check: HashSet<_> = languages.collect();
- let loader = crate::helpers::syn_loader();
+ let loader = helix_core::config::default_lang_loader();
for (_language, lang_data) in loader.languages() {
if !languages_to_check.is_empty()
&& !languages_to_check.contains(&lang_data.config().language_id)
diff --git a/xtask/src/path.rs b/xtask/src/path.rs
index cf8e8792..a46bdda0 100644
--- a/xtask/src/path.rs
+++ b/xtask/src/path.rs
@@ -22,7 +22,3 @@ pub fn ts_queries() -> PathBuf {
pub fn themes() -> PathBuf {
runtime().join("themes")
}
-
-pub fn lang_config() -> PathBuf {
- project_root().join("languages.toml")
-}