-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathopts.rs
More file actions
32 lines (26 loc) · 1 KB
/
opts.rs
File metadata and controls
32 lines (26 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
use clap::Parser;
#[derive(Parser, Debug)]
#[clap(name = "drupal_ls")]
pub struct DrupalLspConfig {
/// The file to pipe logs out to.
#[clap(short, long)]
pub file: Option<String>,
/// The log level to use, defaults to INFO
/// Valid values are: TRACE, DEBUG, INFO, WARN, ERROR
#[clap(short, long, default_value = "INFO")]
pub level: String,
/// Uses stdio as the communication channel, will be as the default communication channel.
#[clap(short, long)]
pub stdio: bool,
/// Use pipes (Windows) or socket files (Linux, Mac) as the communication channel.
/// The pipe / socket file name is passed as the next arg or with --pipe=.
/// Unsupported for now!
#[clap(short, long)]
pub pipe: Option<String>,
/// Uses a socket as the communication channel. The port is passed as next arg or with --port=.
#[clap(short, long)]
pub socket: Option<u16>,
/// The port to use for the socket connection.
#[clap(short, long)]
pub port: Option<u16>,
}