aboutsummaryrefslogtreecommitdiff
path: root/crates/completion/src/completions
diff options
context:
space:
mode:
Diffstat (limited to 'crates/completion/src/completions')
-rw-r--r--crates/completion/src/completions/unqualified_path.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/completion/src/completions/unqualified_path.rs b/crates/completion/src/completions/unqualified_path.rs
index 2a315cb86..f65709adf 100644
--- a/crates/completion/src/completions/unqualified_path.rs
+++ b/crates/completion/src/completions/unqualified_path.rs
@@ -44,7 +44,7 @@ pub(crate) fn complete_unqualified_path(acc: &mut Completions, ctx: &CompletionC
44 acc.add_resolution(ctx, name.to_string(), &res) 44 acc.add_resolution(ctx, name.to_string(), &res)
45 }); 45 });
46 46
47 if !ctx.config.disable_fuzzy_autoimports && ctx.config.resolve_additional_edits_lazily() { 47 if ctx.config.enable_autoimport_completions && ctx.config.resolve_additional_edits_lazily() {
48 fuzzy_completion(acc, ctx).unwrap_or_default() 48 fuzzy_completion(acc, ctx).unwrap_or_default()
49 } 49 }
50} 50}
@@ -116,7 +116,9 @@ fn complete_enum_variants(acc: &mut Completions, ctx: &CompletionContext, ty: &T
116// 116//
117// .Feature toggle 117// .Feature toggle
118// 118//
119// The feature can be forcefully turned off in the settings with the `rust-analyzer.completion.disableFuzzyAutoimports` flag. 119// The feature can be forcefully turned off in the settings with the `rust-analyzer.completion.enableAutoimportCompletions` flag.
120// Note that having this flag set to `true` does not guarantee that the feature is enabled: your client needs to have the corredponding
121// capability enabled.
120fn fuzzy_completion(acc: &mut Completions, ctx: &CompletionContext) -> Option<()> { 122fn fuzzy_completion(acc: &mut Completions, ctx: &CompletionContext) -> Option<()> {
121 let _p = profile::span("fuzzy_completion"); 123 let _p = profile::span("fuzzy_completion");
122 let potential_import_name = ctx.token.to_string(); 124 let potential_import_name = ctx.token.to_string();