@@ -404,7 +404,6 @@ import REPL.REPLCompletions:
404404 subscript_regex,
405405 superscripts,
406406 superscript_regex,
407- afterusing,
408407 dict_identifier_key
409408
410409@static if VERSION ≥ v " 1.10.0-DEV.941"
@@ -460,7 +459,10 @@ function complete_keyword_argument(partial, last_idx, context_module)
460459 end
461460
462461 suggestions = Completion[KeywordArgumentCompletion (kwarg, partial) for kwarg in kwargs]
463- repl_completions = @static if VERSION ≥ v " 1.10.0-DEV.981"
462+ repl_completions = @static if VERSION ≥ v " 1.12.0-DEV.639"
463+ REPL. REPLCompletions. complete_symbol! (REPL. REPLCompletions. Completion[],
464+ nothing , last_word, context_module)
465+ elseif VERSION ≥ v " 1.10.0-DEV.981"
464466 REPL. REPLCompletions. complete_symbol (nothing , last_word, Returns (true ), context_module)
465467 else
466468 REPL. REPLCompletions. complete_symbol (last_word, (mod,x)-> true , context_module)
601603
602604end # @static if isdefined(Base, :TOML)
603605
604- function completions (string:: String , pos:: Int , context_module:: Module = Main, shift:: Bool = true ;
606+ after_using_or_import (string, startpos) = @static if VERSION ≥ v " 1.12.0-DEV.699"
607+ REPL. REPLCompletions. get_import_mode (string) ∈ (:using_module , :import_module )
608+ else
609+ REPL. REPLCompletions. afterusing (string, startpos)
610+ end
611+
612+ function completions (string:: String , pos:: Int , context_module:: Module = Main, shift:: Bool = true ;
605613 enable_questionmark_methods:: Bool = true ,
606614 enable_dict_keys:: Bool = true ,
607615 enable_expanduser:: Bool = true ,
@@ -741,7 +749,7 @@ function completions(string::String, pos::Int, context_module::Module = Main, sh
741749 ffunc = (mod,x)-> true
742750 suggestions = Completion[]
743751 comp_keywords = true
744- if enable_packages && afterusing (string, startpos)
752+ if enable_packages && after_using_or_import (string, startpos)
745753 # We're right after using or import. Let's look only for packages
746754 # and modules we can reach from here
747755
0 commit comments