Skip to content

Commit 5fa8290

Browse files
authored
feat: support version flag in CLI (#13)
1 parent 7261897 commit 5fa8290

File tree

3 files changed

+135
-0
lines changed

3 files changed

+135
-0
lines changed

Cargo.lock

Lines changed: 127 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ serde_json = "1.0.140"
2323
hex = "0.4.3"
2424
thiserror = "2.0.12"
2525
url = "2.5.4"
26+
clap = { version = "4.5", features = ["derive"] }
2627

2728
# The profile that 'dist' will build with
2829
[profile.dist]

src/main.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1+
use clap::Parser;
12
use tower::ServiceBuilder;
23
use tower_lsp::{LspService, Server};
34
use tx3_lsp::Context;
45

6+
#[derive(Parser)]
7+
#[command(author, version, about, long_about = None)]
8+
struct Args {}
9+
510
#[tokio::main]
611
async fn main() {
12+
let _args = Args::parse();
13+
714
let stdin = tokio::io::stdin();
815
let stdout = tokio::io::stdout();
916

0 commit comments

Comments
 (0)