Skip to content

Commit b1214a5

Browse files
author
Brian Ryall
committed
feat: add version command to cli
1 parent 1ceac17 commit b1214a5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

crates/lsp/src/main.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,15 @@ fn main() {
1111
.args(&[
1212
arg!(--stdio "specifies to use stdio to communicate with lsp"),
1313
arg!(--log "write log to file"),
14+
arg!(version: -v --version),
1415
])
1516
.get_matches();
1617

18+
if matches.args_present() && matches.get_flag("version") {
19+
print!("{}", std::env!("CARGO_PKG_VERSION"));
20+
return;
21+
}
22+
1723
setup_logging(matches.get_flag("log"));
1824

1925
beancount_language_server::run_server()

0 commit comments

Comments
 (0)