MCPcopy Create free account
hub / github.com/Eeive/Evcode-ide / start_async

Method start_async

src/lsp/mod.rs:51–65  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

49 }
50
51 pub async fn start_async(&mut self) -> Option<mpsc::Sender<String>> {
52 let server = self.server_name.clone()?;
53 let (ui_tx, ui_rx) = mpsc::channel::<LspMessage>(64);
54 let (req_tx, mut req_rx) = mpsc::channel::<String>(64);
55
56 self.rx = Some(ui_rx);
57
58 tokio::spawn(async move {
59 if let Err(e) = lsp_worker(&server, ui_tx.clone(), &mut req_rx).await {
60 let _ = ui_tx.send(LspMessage::Error(format!("LSP ошибка: {e}"))).await;
61 }
62 });
63
64 Some(req_tx)
65 }
66
67 pub fn poll_messages(&mut self) {
68 if let Some(rx) = &mut self.rx {

Callers 1

newMethod · 0.80

Calls 1

lsp_workerFunction · 0.85

Tested by

no test coverage detected