aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
authorwojciechkepka2021-06-18 03:42:34 +0000
committerBlaž Hrastnik2021-06-18 08:42:38 +0000
commit38cb934d8f579663ff13496bf79293103863b60b (patch)
tree3dbd92d6032921381ded7e02e0bd36747e9c2e0f /helix-term/src
parent80b4a690535b2171cc7db2ee6b4daf3bcb4c4f11 (diff)
Add unique id to each lsp client/server pair
Diffstat (limited to 'helix-term/src')
-rw-r--r--helix-term/src/application.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs
index f5cba365..3f1d6a10 100644
--- a/helix-term/src/application.rs
+++ b/helix-term/src/application.rs
@@ -109,8 +109,8 @@ impl Application {
event = reader.next() => {
self.handle_terminal_events(event)
}
- Some(call) = self.editor.language_servers.incoming.next() => {
- self.handle_language_server_message(call).await
+ Some((id, call)) = self.editor.language_servers.incoming.next() => {
+ self.handle_language_server_message(call, id).await
}
Some(callback) = &mut self.callbacks.next() => {
self.handle_language_server_callback(callback)
@@ -153,8 +153,12 @@ impl Application {
}
}
- pub async fn handle_language_server_message(&mut self, call: helix_lsp::Call) {
- use helix_lsp::{Call, Notification};
+ pub async fn handle_language_server_message(
+ &mut self,
+ call: helix_lsp::Call,
+ server_id: usize,
+ ) {
+ use helix_lsp::{Call, MethodCall, Notification};
match call {
Call::Notification(helix_lsp::jsonrpc::Notification { method, params, .. }) => {
let notification = match Notification::parse(&method, params) {