From 6c324acf2363e88293ab94cf3de6c9d7a264b55d Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 15 Dec 2021 13:23:43 -0500 Subject: feat: REPL import specifier auto-completions (#13078) --- cli/lsp/completions.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cli/lsp/completions.rs') diff --git a/cli/lsp/completions.rs b/cli/lsp/completions.rs index 0dafa6e85..ec9467a1f 100644 --- a/cli/lsp/completions.rs +++ b/cli/lsp/completions.rs @@ -1,5 +1,6 @@ // Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. +use super::client::Client; use super::language_server; use super::lsp_custom; use super::tsc; @@ -37,7 +38,7 @@ pub struct CompletionItemData { async fn check_auto_config_registry( url_str: &str, snapshot: &language_server::StateSnapshot, - client: lspower::Client, + client: Client, ) { // check to see if auto discovery is enabled if snapshot @@ -82,7 +83,7 @@ async fn check_auto_config_registry( // TODO(@kitsonk) clean up protocol when doing v2 of suggestions if suggestions { client - .send_custom_notification::( + .send_registry_state_notification( lsp_custom::RegistryStateNotificationParams { origin, suggestions, @@ -133,7 +134,7 @@ pub(crate) async fn get_import_completions( specifier: &ModuleSpecifier, position: &lsp::Position, state_snapshot: &language_server::StateSnapshot, - client: lspower::Client, + client: Client, ) -> Option { let document = state_snapshot.documents.get(specifier)?; let (text, _, range) = document.get_maybe_dependency(position)?; -- cgit v1.2.3