Skip to content

Commit d155655

Browse files
Rename the module
1 parent 0e050fc commit d155655

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

crates/completion/src/completions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub(crate) mod postfix;
1313
pub(crate) mod macro_in_item_position;
1414
pub(crate) mod trait_impl;
1515
pub(crate) mod mod_;
16-
pub(crate) mod complete_magic;
16+
pub(crate) mod magic;
1717

1818
use hir::{ModPath, ScopeDef, Type};
1919

crates/completion/src/completions/complete_magic.rs renamed to crates/completion/src/completions/magic.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crate::{context::CompletionContext, item::CompletionKind, CompletionItem, Co
1111

1212
use super::Completions;
1313

14-
// TODO kb when typing, completes partial results, need to rerun manually to see the proper ones
14+
// TODO kb add a setting toggle for this feature?
1515
pub(crate) fn complete_magic(acc: &mut Completions, ctx: &CompletionContext) -> Option<()> {
1616
if !(ctx.is_trivial_path || ctx.is_pat_binding_or_const) {
1717
return None;
@@ -20,8 +20,6 @@ pub(crate) fn complete_magic(acc: &mut Completions, ctx: &CompletionContext) ->
2020
let anchor = ctx.name_ref_syntax.as_ref()?;
2121
let import_scope = ImportScope::find_insert_use_container(anchor.syntax(), &ctx.sema)?;
2222

23-
// TODO kb consider heuristics, such as "don't show `hash_map` import if `HashMap` is the import for completion"
24-
// also apply completion ordering
2523
let potential_import_name = ctx.token.to_string();
2624

2725
let possible_imports = ctx
@@ -34,8 +32,6 @@ pub(crate) fn complete_magic(acc: &mut Completions, ctx: &CompletionContext) ->
3432
Either::Left(module_def) => current_module.find_use_path(ctx.db, module_def),
3533
Either::Right(macro_def) => current_module.find_use_path(ctx.db, macro_def),
3634
}?;
37-
// TODO kb need to omit braces when there are some already.
38-
// maybe remove braces completely?
3935
Some((use_path, additional_completion(ctx.db, import_candidate)))
4036
})
4137
.filter_map(|(mod_path, additional_completion)| {

0 commit comments

Comments
 (0)