diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2023-10-12 16:07:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-12 16:07:27 +0100 |
commit | 5dd010a4fbeb0602891ea537b98216b8ad7d27a7 (patch) | |
tree | 00686cddbe5de68262b9c4348e02df0c86bf8fc3 /cli/lsp/client.rs | |
parent | eaeb10cee123b8184148c957151be226fb865bd2 (diff) |
feat(lsp): send "deno/didChangeDenoConfiguration" notifications (#20827)
Diffstat (limited to 'cli/lsp/client.rs')
-rw-r--r-- | cli/lsp/client.rs | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/cli/lsp/client.rs b/cli/lsp/client.rs index b5cdf8eb9..210aa1da3 100644 --- a/cli/lsp/client.rs +++ b/cli/lsp/client.rs @@ -84,6 +84,19 @@ impl Client { }); } + pub fn send_did_change_deno_configuration_notification( + &self, + params: lsp_custom::DidChangeDenoConfigurationNotificationParams, + ) { + // do on a task in case the caller currently is in the lsp lock + let client = self.0.clone(); + spawn(async move { + client + .send_did_change_deno_configuration_notification(params) + .await; + }); + } + pub fn show_message( &self, message_type: lsp::MessageType, @@ -184,6 +197,10 @@ trait ClientTrait: Send + Sync { params: lsp_custom::DiagnosticBatchNotificationParams, ); async fn send_test_notification(&self, params: TestingNotification); + async fn send_did_change_deno_configuration_notification( + &self, + params: lsp_custom::DidChangeDenoConfigurationNotificationParams, + ); async fn specifier_configurations( &self, uris: Vec<lsp::Url>, @@ -259,6 +276,18 @@ impl ClientTrait for TowerClient { } } + async fn send_did_change_deno_configuration_notification( + &self, + params: lsp_custom::DidChangeDenoConfigurationNotificationParams, + ) { + self + .0 + .send_notification::<lsp_custom::DidChangeDenoConfigurationNotification>( + params, + ) + .await + } + async fn specifier_configurations( &self, uris: Vec<lsp::Url>, @@ -371,6 +400,12 @@ impl ClientTrait for ReplClient { async fn send_test_notification(&self, _params: TestingNotification) {} + async fn send_did_change_deno_configuration_notification( + &self, + _params: lsp_custom::DidChangeDenoConfigurationNotificationParams, + ) { + } + async fn specifier_configurations( &self, uris: Vec<lsp::Url>, |