diff options
Diffstat (limited to 'support/texlab/src/main.rs')
-rw-r--r-- | support/texlab/src/main.rs | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/support/texlab/src/main.rs b/support/texlab/src/main.rs index 415de3b804..c3616a3e96 100644 --- a/support/texlab/src/main.rs +++ b/support/texlab/src/main.rs @@ -1,29 +1,34 @@ use std::{env, fs::OpenOptions, io, path::PathBuf}; use anyhow::Result; +use clap::Parser; use log::LevelFilter; use lsp_server::Connection; -use structopt::StructOpt; use texlab::Server; /// An implementation of the Language Server Protocol for LaTeX -#[derive(Debug, StructOpt)] +#[derive(Debug, Parser)] +#[clap(version)] struct Opts { /// Increase message verbosity (-vvvv for max verbosity) - #[structopt(short, long, parse(from_occurrences))] + #[clap(short, long, parse(from_occurrences))] verbosity: u8, /// No output printed to stderr - #[structopt(short, long)] + #[clap(short, long)] quiet: bool, /// Write the logging output to FILE - #[structopt(long, name = "FILE", parse(from_os_str))] + #[clap(long, name = "FILE", parse(from_os_str))] log_file: Option<PathBuf>, + + /// Print version information and exit + #[clap(short = 'V', long)] + version: bool, } fn main() -> Result<()> { - let opts = Opts::from_args(); + let opts = Opts::parse(); setup_logger(opts); let (connection, threads) = Connection::stdio(); |