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, 18 insertions, 4 deletions
diff --git a/crates/rust-analyzer/src/bin/main.rs b/crates/rust-analyzer/src/bin/main.rs
index 7cfc44f01..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,16 +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
42 args::Command::Diagnostics { path, load_output_dirs, all } => { 50 args::Command::Diagnostics { path, load_output_dirs, with_proc_macro, all } => {
43 cli::diagnostics(path.as_ref(), load_output_dirs, all)? 51 cli::diagnostics(path.as_ref(), load_output_dirs, with_proc_macro, all)?
44 } 52 }
45 53
54 args::Command::ProcMacro => run_proc_macro_sv()?,
46 args::Command::RunServer => run_server()?, 55 args::Command::RunServer => run_server()?,
47 args::Command::Version => println!("rust-analyzer {}", env!("REV")), 56 args::Command::Version => println!("rust-analyzer {}", env!("REV")),
48 } 57 }
@@ -56,6 +65,11 @@ fn setup_logging() -> Result<()> {
56 Ok(()) 65 Ok(())
57} 66}
58 67
68fn run_proc_macro_sv() -> Result<()> {
69 ra_proc_macro_srv::cli::run();
70 Ok(())
71}
72
59fn run_server() -> Result<()> { 73fn run_server() -> Result<()> {
60 log::info!("lifecycle: server started"); 74 log::info!("lifecycle: server started");
61 75