diff options
Diffstat (limited to 'crates/ra_cli')
-rw-r--r-- | crates/ra_cli/src/main.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/crates/ra_cli/src/main.rs b/crates/ra_cli/src/main.rs index 93aba4c70..84a1564ce 100644 --- a/crates/ra_cli/src/main.rs +++ b/crates/ra_cli/src/main.rs | |||
@@ -16,7 +16,10 @@ fn main() -> Result<()> { | |||
16 | .setting(clap::AppSettings::SubcommandRequiredElseHelp) | 16 | .setting(clap::AppSettings::SubcommandRequiredElseHelp) |
17 | .subcommand(SubCommand::with_name("parse").arg(Arg::with_name("no-dump").long("--no-dump"))) | 17 | .subcommand(SubCommand::with_name("parse").arg(Arg::with_name("no-dump").long("--no-dump"))) |
18 | .subcommand(SubCommand::with_name("symbols")) | 18 | .subcommand(SubCommand::with_name("symbols")) |
19 | .subcommand(SubCommand::with_name("highlight")) | 19 | .subcommand( |
20 | SubCommand::with_name("highlight") | ||
21 | .arg(Arg::with_name("rainbow").short("r").long("rainbow")), | ||
22 | ) | ||
20 | .subcommand( | 23 | .subcommand( |
21 | SubCommand::with_name("analysis-stats") | 24 | SubCommand::with_name("analysis-stats") |
22 | .arg(Arg::with_name("verbose").short("v").long("verbose")) | 25 | .arg(Arg::with_name("verbose").short("v").long("verbose")) |
@@ -39,9 +42,9 @@ fn main() -> Result<()> { | |||
39 | println!("{:?}", s); | 42 | println!("{:?}", s); |
40 | } | 43 | } |
41 | } | 44 | } |
42 | ("highlight", _) => { | 45 | ("highlight", Some(matches)) => { |
43 | let (analysis, file_id) = Analysis::from_single_file(read_stdin()?); | 46 | let (analysis, file_id) = Analysis::from_single_file(read_stdin()?); |
44 | let html = analysis.highlight_as_html(file_id).unwrap(); | 47 | let html = analysis.highlight_as_html(file_id, matches.is_present("rainbow")).unwrap(); |
45 | println!("{}", html); | 48 | println!("{}", html); |
46 | } | 49 | } |
47 | ("analysis-stats", Some(matches)) => { | 50 | ("analysis-stats", Some(matches)) => { |