mirror of
https://github.com/sharkdp/bat.git
synced 2025-09-08 14:22:25 +01:00
Add code for analyzing dependencies between syntaxes
And also to generate independent SyntaxSets. This will later be used to improve bat startup time.
This commit is contained in:
@@ -111,6 +111,12 @@ impl HighlightingAssets {
|
||||
);
|
||||
}
|
||||
|
||||
if std::env::var("BAT_PRINT_SYNTAX_DEPENDENCIES").is_ok() {
|
||||
// To trigger this code, run:
|
||||
// BAT_PRINT_SYNTAX_DEPENDENCIES=1 cargo run -- cache --build --source assets --blank --target /tmp
|
||||
crate::syntax_dependencies::print_syntax_dependencies(&syntax_set_builder);
|
||||
}
|
||||
|
||||
let syntax_set = syntax_set_builder.build();
|
||||
let missing_contexts = syntax_set.find_unlinked_contexts();
|
||||
if !missing_contexts.is_empty() {
|
||||
|
Reference in New Issue
Block a user