aboutsummaryrefslogtreecommitdiff
path: root/helix-term/build.rs
blob: b47dae8ef65307c680e617ced18257f07998aa12 (plain) (blame)
1
2
3
4
5
6
7
8
9
use helix_loader::grammar::{build_grammars, fetch_grammars};

fn main() {
    if std::env::var("HELIX_DISABLE_AUTO_GRAMMAR_BUILD").is_err() {
        fetch_grammars().expect("Failed to fetch tree-sitter grammars");
        build_grammars(Some(std::env::var("TARGET").unwrap()))
            .expect("Failed to compile tree-sitter grammars");
    }
}