jjpwrgem_lsp/lib.rs
1mod backend;
2mod range;
3
4use backend::Backend;
5use tower_lsp_server::{LspService, Server};
6
7pub async fn run() {
8 let stdin = tokio::io::stdin();
9 let stdout = tokio::io::stdout();
10
11 let (service, socket) = LspService::new(Backend::new);
12
13 Server::new(stdin, stdout, socket).serve(service).await;
14}
15
16pub fn run_blocking() {
17 tokio::runtime::Builder::new_current_thread()
18 .enable_all()
19 .build()
20 .expect("failed to build tokio runtime")
21 .block_on(run());
22}