Skip to content

Commit

Permalink
Set features early
Browse files Browse the repository at this point in the history
Fixes #252
  • Loading branch information
dandavison committed Jul 15, 2020
1 parent b888c03 commit e65db80
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/options/set.rs
Expand Up @@ -64,26 +64,26 @@ pub fn set_options(
arg_matches: &clap::ArgMatches,
assets: HighlightingAssets,
) {
let option_names = cli::Opt::get_option_names();

if let Some(git_config) = git_config {
if opt.no_gitconfig {
git_config.enabled = false;
}
}

let option_names = cli::Opt::get_option_names();

// Set features
let builtin_features = features::make_builtin_features();
let features = gather_features(opt, &builtin_features, git_config);
opt.features = features.join(" ");

set_widths(opt);

// Set light, dark, and syntax-theme.
set_true_color(opt);
set__light__dark__syntax_theme__options(opt, git_config, arg_matches, &option_names);
theme::set__is_light_mode__syntax_theme__syntax_set(opt, assets);

let builtin_features = features::make_builtin_features();
// Set features
let features = gather_features(opt, &builtin_features, git_config);
opt.features = features.join(" ");

// HACK: make minus-line styles have syntax-highlighting iff side-by-side.
if features.contains(&"side-by-side".to_string()) {
let prefix = "normal ";
Expand Down

0 comments on commit e65db80

Please sign in to comment.