Skip to content

Offline, privacy-first grammar checker. Fast, open-source, Rust-powered

feat(ls): allow skipping the version check (#1334)

Elijah Pottere1aad217fed9
diff --git a/harper-ls/src/main.rs b/harper-ls/src/main.rs
index 468d743bb..02191422b 100644
--- a/harper-ls/src/main.rs
+++ b/harper-ls/src/main.rs
@@ -32,6 +32,9 @@ struct Args {
/// Set to listen on standard input / output rather than TCP.
#[arg(short, long, default_value_t = false)]
stdio: bool,
+ /// Skip the debug version check.
+ #[arg(long, default_value_t = false)]
+ skip_version_check: bool,
}
// Setting worker threads to four means the process will use about five threads total
@@ -46,11 +49,13 @@ async fn main() -> anyhow::Result<()> {
tracing::subscriber::set_global_default(subscriber)?;
- tokio::spawn(log_version_info());
-
let args = Args::parse();
let config = Config::default();
+ if !args.skip_version_check {
+ tokio::spawn(log_version_info());
+ }
+
let (service, socket) = LspService::new(|client| Backend::new(client, config));
if args.stdio {