aboutsummaryrefslogtreecommitdiff
path: root/crates/completion/src/completions/unqualified_path.rs
diff options
context:
space:
mode:
authorKirill Bulatov <[email protected]>2020-12-08 12:27:18 +0000
committerKirill Bulatov <[email protected]>2020-12-08 12:27:18 +0000
commitcbd3717f2c52b17aa9b15c2df4a364c62d17e4e1 (patch)
tree288fb7dea2b2ef504ae6f8d87d8fc74d043625da /crates/completion/src/completions/unqualified_path.rs
parent3183ff3a7b1fbcf3cb5379cf162a3d769a21be7a (diff)
Better config name
Diffstat (limited to 'crates/completion/src/completions/unqualified_path.rs')
-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();