internal: prepare to use standard .run pattern for subcommands
This commit is contained in:
parent
0d2b423f40
commit
e8a67b67bf
@ -1,7 +1,6 @@
|
|||||||
//! Driver for rust-analyzer.
|
//! Driver for rust-analyzer.
|
||||||
//!
|
//!
|
||||||
//! Based on cli flags, either spawns an LSP server, or runs a batch analysis
|
//! Based on cli flags, either spawns an LSP server, or runs a batch analysis
|
||||||
mod flags;
|
|
||||||
mod logger;
|
mod logger;
|
||||||
mod rustc_wrapper;
|
mod rustc_wrapper;
|
||||||
|
|
||||||
@ -10,7 +9,7 @@
|
|||||||
use lsp_server::Connection;
|
use lsp_server::Connection;
|
||||||
use project_model::ProjectManifest;
|
use project_model::ProjectManifest;
|
||||||
use rust_analyzer::{
|
use rust_analyzer::{
|
||||||
cli::{self, AnalysisStatsCmd},
|
cli::{self, flags, AnalysisStatsCmd},
|
||||||
config::Config,
|
config::Config,
|
||||||
from_json,
|
from_json,
|
||||||
lsp_ext::supports_utf8,
|
lsp_ext::supports_utf8,
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
//! Various batch processing tasks, intended primarily for debugging.
|
//! Various batch processing tasks, intended primarily for debugging.
|
||||||
|
|
||||||
|
pub mod flags;
|
||||||
pub mod load_cargo;
|
pub mod load_cargo;
|
||||||
mod analysis_stats;
|
mod analysis_stats;
|
||||||
mod diagnostics;
|
mod diagnostics;
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
use ide_ssr::{SsrPattern, SsrRule};
|
use ide_ssr::{SsrPattern, SsrRule};
|
||||||
use rust_analyzer::cli::Verbosity;
|
|
||||||
|
use crate::cli::Verbosity;
|
||||||
|
|
||||||
xflags::xflags! {
|
xflags::xflags! {
|
||||||
src "./src/bin/flags.rs"
|
src "./src/bin/flags.rs"
|
||||||
@ -196,7 +197,7 @@ pub fn from_env() -> xflags::Result<Self> {
|
|||||||
// generated end
|
// generated end
|
||||||
|
|
||||||
impl RustAnalyzer {
|
impl RustAnalyzer {
|
||||||
pub(crate) fn verbosity(&self) -> Verbosity {
|
pub fn verbosity(&self) -> Verbosity {
|
||||||
if self.quiet {
|
if self.quiet {
|
||||||
return Verbosity::Quiet;
|
return Verbosity::Quiet;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user