aboutsummaryrefslogtreecommitdiff
path: root/crates/rust-analyzer/src/bin/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/rust-analyzer/src/bin/main.rs')
-rw-r--r--crates/rust-analyzer/src/bin/main.rs22
1 files changed, 20 insertions, 2 deletions
diff --git a/crates/rust-analyzer/src/bin/main.rs b/crates/rust-analyzer/src/bin/main.rs
index 608f4f67b..28b67cfe2 100644
--- a/crates/rust-analyzer/src/bin/main.rs
+++ b/crates/rust-analyzer/src/bin/main.rs
@@ -25,6 +25,7 @@ fn main() -> Result<()> {
25 with_deps, 25 with_deps,
26 path, 26 path,
27 load_output_dirs, 27 load_output_dirs,
28 with_proc_macro,
28 } => cli::analysis_stats( 29 } => cli::analysis_stats(
29 args.verbosity, 30 args.verbosity,
30 memory_usage, 31 memory_usage,
@@ -33,12 +34,24 @@ fn main() -> Result<()> {
33 with_deps, 34 with_deps,
34 randomize, 35 randomize,
35 load_output_dirs, 36 load_output_dirs,
37 with_proc_macro,
36 )?, 38 )?,
37 39
38 args::Command::Bench { path, what, load_output_dirs } => { 40 args::Command::Bench { path, what, load_output_dirs, with_proc_macro } => {
39 cli::analysis_bench(args.verbosity, path.as_ref(), what, load_output_dirs)? 41 cli::analysis_bench(
42 args.verbosity,
43 path.as_ref(),
44 what,
45 load_output_dirs,
46 with_proc_macro,
47 )?
40 } 48 }
41 49
50 args::Command::Diagnostics { path, load_output_dirs, with_proc_macro, all } => {
51 cli::diagnostics(path.as_ref(), load_output_dirs, with_proc_macro, all)?
52 }
53
54 args::Command::ProcMacro => run_proc_macro_sv()?,
42 args::Command::RunServer => run_server()?, 55 args::Command::RunServer => run_server()?,
43 args::Command::Version => println!("rust-analyzer {}", env!("REV")), 56 args::Command::Version => println!("rust-analyzer {}", env!("REV")),
44 } 57 }
@@ -52,6 +65,11 @@ fn setup_logging() -> Result<()> {
52 Ok(()) 65 Ok(())
53} 66}
54 67
68fn run_proc_macro_sv() -> Result<()> {
69 ra_proc_macro_srv::cli::run();
70 Ok(())
71}
72
55fn run_server() -> Result<()> { 73fn run_server() -> Result<()> {
56 log::info!("lifecycle: server started"); 74 log::info!("lifecycle: server started");
57 75