@@ -11,7 +11,7 @@ use crate::{context::CompletionContext, item::CompletionKind, CompletionItem, Co
1111
1212use 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?
1515pub ( 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