summaryrefslogtreecommitdiff
path: root/helix-lsp/src/lib.rs
diff options
context:
space:
mode:
authorEgor Karavaev2021-06-07 19:11:17 +0000
committerBlaž Hrastnik2021-06-08 01:56:46 +0000
commitea6667070f05227f5d87eaf977ca0c7ddc982c0a (patch)
tree3a99d1fc8c2247e4a7cc04339c9f7e62c037bd7e /helix-lsp/src/lib.rs
parent960bc9f13446e1fbcc36f1a3be3541ec1b9ec5bd (diff)
helix-lsp cleanup
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>>,