Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-term/src/application.rs')
-rw-r--r--helix-term/src/application.rs11
1 files changed, 3 insertions, 8 deletions
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs
index 809393c7..6bdf60bc 100644
--- a/helix-term/src/application.rs
+++ b/helix-term/src/application.rs
@@ -4,7 +4,7 @@ use helix_core::{diagnostic::Severity, pos_at_coords, syntax, Selection};
use helix_lsp::{
lsp::{self, notification::Notification},
util::lsp_range_to_range,
- LspProgressMap,
+ LanguageServerId, LspProgressMap,
};
use helix_stdx::path::get_relative_path;
use helix_view::{
@@ -655,7 +655,7 @@ impl Application {
pub async fn handle_language_server_message(
&mut self,
call: helix_lsp::Call,
- server_id: usize,
+ server_id: LanguageServerId,
) {
use helix_lsp::{Call, MethodCall, Notification};
@@ -1030,12 +1030,7 @@ impl Application {
Ok(json!(result))
}
Ok(MethodCall::RegisterCapability(params)) => {
- if let Some(client) = self
- .editor
- .language_servers
- .iter_clients()
- .find(|client| client.id() == server_id)
- {
+ if let Some(client) = self.editor.language_servers.get_by_id(server_id) {
for reg in params.registrations {
match reg.method.as_str() {
lsp::notification::DidChangeWatchedFiles::METHOD => {