Add proc-macro cli command for rust-analyzer
This commit is contained in:
@@ -45,6 +45,7 @@ pub(crate) enum Command {
|
||||
/// this would include the parser test files.
|
||||
all: bool,
|
||||
},
|
||||
ProcMacro,
|
||||
RunServer,
|
||||
Version,
|
||||
}
|
||||
@@ -264,6 +265,7 @@ ARGS:
|
||||
|
||||
Command::Diagnostics { path, load_output_dirs, with_proc_macro, all }
|
||||
}
|
||||
"proc-macro" => Command::ProcMacro,
|
||||
_ => {
|
||||
eprintln!(
|
||||
"\
|
||||
|
||||
@@ -51,6 +51,7 @@ fn main() -> Result<()> {
|
||||
cli::diagnostics(path.as_ref(), load_output_dirs, with_proc_macro, all)?
|
||||
}
|
||||
|
||||
args::Command::ProcMacro => run_proc_macro_sv()?,
|
||||
args::Command::RunServer => run_server()?,
|
||||
args::Command::Version => println!("rust-analyzer {}", env!("REV")),
|
||||
}
|
||||
@@ -64,6 +65,11 @@ fn setup_logging() -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn run_proc_macro_sv() -> Result<()> {
|
||||
ra_proc_macro_srv::cli::run();
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn run_server() -> Result<()> {
|
||||
log::info!("lifecycle: server started");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user