Skip to content

[REPL] Handle empty completion, keywords better #59045

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xal-0
Copy link
Member

@xal-0 xal-0 commented Jul 19, 2025

When the context is empty, (like ""), return only names local to the module (fixes #58931).

If the cursor is on something that "looks like" an identifier, like a boolean or one of the keywords, treat it as if it was one for completion purposes. Typing a keyword and hitting tab no longer returns the completions for the empty input (fixes #58309, #58832).

When the context is empty, (like "<TAB><TAB>"), return only names local to the
module (fixes JuliaLang#58931).

If the cursor is on something that "looks like" an identifier, like a boolean or
one of the keywords, treat it as if it was one for completion purposes.  Typing
a keyword and hitting tab no longer returns the completions for the empty
input (fixes JuliaLang#58309, JuliaLang#58832).
@xal-0 xal-0 added bugfix This change fixes an existing bug completions Tab and autocompletion in the repl labels Jul 19, 2025
@jakobnissen
Copy link
Member

jakobnissen commented Jul 19, 2025

Thanks!
An alternative suggestion: Disable tab-completion when the prompt is empty. This sometimes happen when you press the tab too many times (e.g. when the REPL for other reasons is unresponsive), and it's not really useful.
To get all names in a module, it's more straightforward to write MyModule.<TAB>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This change fixes an existing bug completions Tab and autocompletion in the repl
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tab Completion in Contextual Module shows too many functions Tab-completion after keyword suggests every symbol
3 participants