aboutsummaryrefslogtreecommitdiff
path: root/crates/ide
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide')
-rw-r--r--crates/ide/src/lib.rs24
1 files changed, 23 insertions, 1 deletions
diff --git a/crates/ide/src/lib.rs b/crates/ide/src/lib.rs
index 5244bdd61..71068cac2 100644
--- a/crates/ide/src/lib.rs
+++ b/crates/ide/src/lib.rs
@@ -80,7 +80,8 @@ pub use crate::{
80 }, 80 },
81}; 81};
82pub use completion::{ 82pub use completion::{
83 CompletionConfig, CompletionItem, CompletionItemKind, CompletionScore, InsertTextFormat, 83 CompletionConfig, CompletionItem, CompletionItemKind, CompletionResolveCapability,
84 CompletionScore, ImportEdit, InsertTextFormat,
84}; 85};
85pub use ide_db::{ 86pub use ide_db::{
86 call_info::CallInfo, 87 call_info::CallInfo,
@@ -468,6 +469,27 @@ impl Analysis {
468 self.with_db(|db| completion::completions(db, config, position).map(Into::into)) 469 self.with_db(|db| completion::completions(db, config, position).map(Into::into))
469 } 470 }
470 471
472 /// Resolves additional completion data at the position given.
473 pub fn resolve_completion_edits(
474 &self,
475 config: &CompletionConfig,
476 position: FilePosition,
477 full_import_path: &str,
478 imported_name: &str,
479 ) -> Cancelable<Vec<TextEdit>> {
480 Ok(self
481 .with_db(|db| {
482 completion::resolve_completion_edits(
483 db,
484 config,
485 position,
486 full_import_path,
487 imported_name,
488 )
489 })?
490 .unwrap_or_default())
491 }
492
471 /// Computes resolved assists with source changes for the given position. 493 /// Computes resolved assists with source changes for the given position.
472 pub fn resolved_assists( 494 pub fn resolved_assists(
473 &self, 495 &self,