From 4fc991fdeca5db36bd7be7197510e62a019e1677 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Wed, 16 Feb 2022 07:57:20 -0600 Subject: migrate grammar fetching/building code into helix-loader crate This is a rather large refactor that moves most of the code for loading, fetching, and building grammars into a new helix-loader module. This works well with the [[grammars]] syntax for languages.toml defined earlier: we only have to depend on the types for GrammarConfiguration in helix-loader and can leave all the [[language]] entries for helix-core. --- helix-term/src/health.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'helix-term/src/health.rs') diff --git a/helix-term/src/health.rs b/helix-term/src/health.rs index 5ef20d93..f13d35f0 100644 --- a/helix-term/src/health.rs +++ b/helix-term/src/health.rs @@ -1,8 +1,6 @@ use crossterm::style::{Color, Print, Stylize}; -use helix_core::{ - config::{default_syntax_loader, user_syntax_loader}, - syntax::load_runtime_file, -}; +use helix_core::config::{default_syntax_loader, user_syntax_loader}; +use helix_loader::grammar::load_runtime_file; #[derive(Copy, Clone)] pub enum TsFeature { @@ -43,10 +41,10 @@ impl TsFeature { /// Display general diagnostics. pub fn general() { - let config_file = helix_core::config_file(); - let lang_file = helix_core::lang_config_file(); - let log_file = helix_core::log_file(); - let rt_dir = helix_core::runtime_dir(); + let config_file = helix_loader::config_file(); + let lang_file = helix_loader::lang_config_file(); + let log_file = helix_loader::log_file(); + let rt_dir = helix_loader::runtime_dir(); if config_file.exists() { println!("Config file: {}", config_file.display()); -- cgit v1.2.3-70-g09d2