aboutsummaryrefslogtreecommitdiff
path: root/helix-lsp/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-lsp/src/lib.rs')
-rw-r--r--helix-lsp/src/lib.rs27
1 files changed, 10 insertions, 17 deletions
diff --git a/helix-lsp/src/lib.rs b/helix-lsp/src/lib.rs
index af8c9005..5c482774 100644
--- a/helix-lsp/src/lib.rs
+++ b/helix-lsp/src/lib.rs
@@ -1,28 +1,27 @@
mod client;
mod transport;
-pub use jsonrpc_core as jsonrpc;
-pub use lsp_types as lsp;
-
pub use client::Client;
+pub use futures_executor::block_on;
+pub use jsonrpc::Call;
+pub use jsonrpc_core as jsonrpc;
pub use lsp::{Position, Url};
+pub use lsp_types as lsp;
-pub type Result<T> = core::result::Result<T, Error>;
-
+use futures_util::stream::select_all::SelectAll;
use helix_core::syntax::LanguageConfiguration;
-use thiserror::Error;
-
use std::{
collections::{hash_map::Entry, HashMap},
sync::Arc,
};
use serde::{Deserialize, Serialize};
-
+use thiserror::Error;
use tokio_stream::wrappers::UnboundedReceiverStream;
-pub use futures_executor::block_on;
+pub type Result<T> = core::result::Result<T, Error>;
+type LanguageId = String;
#[derive(Error, Debug)]
pub enum Error {
@@ -30,6 +29,8 @@ pub enum Error {
Rpc(#[from] jsonrpc::Error),
#[error("failed to parse: {0}")]
Parse(#[from] serde_json::Error),
+ #[error("IO Error: {0}")]
+ IO(#[from] std::io::Error),
#[error("request timed out")]
Timeout,
#[error("server closed the stream")]
@@ -126,8 +127,6 @@ pub mod util {
}),
)
}
-
- // apply_insert_replace_edit
}
#[derive(Debug, PartialEq, Clone)]
@@ -173,12 +172,6 @@ impl Notification {
}
}
-pub use jsonrpc::Call;
-
-type LanguageId = String;
-
-use futures_util::stream::select_all::SelectAll;
-
pub struct Registry {
inner: HashMap<LanguageId, Arc<Client>>,