Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'src/edi/lsp_mn.rs')
-rw-r--r--src/edi/lsp_mn.rs14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/edi/lsp_mn.rs b/src/edi/lsp_mn.rs
index 25aa478..45cfd24 100644
--- a/src/edi/lsp_mn.rs
+++ b/src/edi/lsp_mn.rs
@@ -4,11 +4,11 @@ use std::path::PathBuf;
use std::process::Stdio;
use std::sync::Arc;
-use log::info;
-use lsp_server::{Connection, IoThreads};
+use lsp_server::Connection;
use lsp_types::*;
use tokio::sync::oneshot::Sender;
use tree_house::Language;
+use url::Url;
use winit::window::Window;
pub struct LSPM {
@@ -20,7 +20,12 @@ pub struct LoadedLSP {
pub iot: Option<IoThreads>,
pub comms: std::thread::JoinHandle<()>,
}
-
+impl LoadedLSP {
+ pub fn status(&self) {
+ assert!(!self.comms.is_finished());
+ }
+}
+mod stdio;
impl LSPM {
pub fn load(
&mut self,
@@ -45,6 +50,7 @@ impl LSPM {
Some((v.c.clone(), Some(w)))
}
}
+use crate::edi::lsp_mn::stdio::IoThreads;
use crate::lsp::Client;
pub fn load(
workspace: &PathBuf,
@@ -89,7 +95,7 @@ pub fn load(
})
.ok()?;
- let (x, iot) = Connection::stdio(
+ let (x, iot) = stdio::transport(
BufReader::new(c.stdout.take().unwrap()),
c.stdin.take().unwrap(),
);