(&self, config: GlobalConfig)
| 11 | |
| 12 | impl Lsp { |
| 13 | pub fn run(&self, config: GlobalConfig) -> CliResult { |
| 14 | let GlobalConfig { debug, .. } = config; |
| 15 | let Lsp {} = self; |
| 16 | let server = Server::new(LSPService::new(crate_version!())); |
| 17 | let stderr_log = |
| 18 | fmt::layer().with_writer(stderr).with_filter(if debug { LevelFilter::TRACE } else { LevelFilter::WARN }); |
| 19 | registry().with(stderr_log).with(server.tracer()).init(); |
| 20 | let thread = server.listen_stdio()?; |
| 21 | trace!("Listening on stdin/stdout"); |
| 22 | thread.sender.join().expect("Couldn't start server").ok(); |
| 23 | Ok(()) |
| 24 | } |
| 25 | } |
nothing calls this directly
no test coverage detected