MCPcopy Create free account
hub / github.com/csskit/csskit / run

Method run

crates/csskit/src/commands/lsp.rs:13–24  ·  view source on GitHub ↗
(&self, config: GlobalConfig)

Source from the content-addressed store, hash-verified

11
12impl 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}

Callers

nothing calls this directly

Calls 3

tracerMethod · 0.80
listen_stdioMethod · 0.80
okMethod · 0.80

Tested by

no test coverage detected