Skip to content
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

[REPL] Autocompletion of arguments inside ModuleName.function call is broken #55420

Open
giordano opened this issue Aug 8, 2024 · 0 comments · May be fixed by #57767
Open

[REPL] Autocompletion of arguments inside ModuleName.function call is broken #55420

giordano opened this issue Aug 8, 2024 · 0 comments · May be fixed by #57767
Labels
bisect wanted bug Indicates an unexpected problem or unintended behavior completions Tab and autocompletion in the repl regression Regression in behavior compared to a previous version REPL Julia's REPL (Read Eval Print Loop)
Milestone

Comments

@giordano
Copy link
Contributor

giordano commented Aug 8, 2024

On f0a2a7a, autocompletion of the arguments inside function calls of the form Module.function is broken, only keywords are suggested, not types, variables, functions, etc. For example:

M.f(p<TAB>

directly autocompletes to

M.f(primitive type

because primitive type is the only keyword starting with p. This is a regression, autocompletion in this situation used to work in previous versions.

@giordano giordano added bug Indicates an unexpected problem or unintended behavior REPL Julia's REPL (Read Eval Print Loop) labels Aug 8, 2024
@giordano giordano added this to the 1.12 milestone Aug 8, 2024
@giordano giordano added the regression Regression in behavior compared to a previous version label Aug 9, 2024
@IanButterworth IanButterworth added the completions Tab and autocompletion in the repl label Sep 24, 2024
xal-0 added a commit to xal-0/julia that referenced this issue Mar 13, 2025
This commit replaces the heuristic parsing done by REPLCompletions.completions
with a new approach that parses the entire input buffer once with JuliaSyntax.
In addition to fixing bugs, the more precise parsing should allow for new
features in the future.

Some features now work in more situations "for free", like dictionary key
completion (the expression evaluated to find the keys is now more precise) and
method suggestions (arguments beyond the cursor can be used to narrow the list).

The tests have been updated to reflect slightly differing behaviour for string
and Cmd-string completion: the new code returns a character range encompassing
the entire string when completing paths (not observable by the user), and the
behaviour of '~'-expansion has be tweaked to be consistent across all places
where paths can be completed.  Some escaping issues have also been fixed.

Fixes: JuliaLang#55420, JuliaLang#55518, JuliaLang#55520, JuliaLang#55842, JuliaLang#56389, JuliaLang#57611
@xal-0 xal-0 linked a pull request Mar 13, 2025 that will close this issue
xal-0 added a commit to xal-0/julia that referenced this issue Mar 13, 2025
This commit replaces the heuristic parsing done by REPLCompletions.completions
with a new approach that parses the entire input buffer once with JuliaSyntax.
In addition to fixing bugs, the more precise parsing should allow for new
features in the future.

Some features now work in more situations "for free", like dictionary key
completion (the expression evaluated to find the keys is now more precise) and
method suggestions (arguments beyond the cursor can be used to narrow the list).

The tests have been updated to reflect slightly differing behaviour for string
and Cmd-string completion: the new code returns a character range encompassing
the entire string when completing paths (not observable by the user), and the
behaviour of '~'-expansion has be tweaked to be consistent across all places
where paths can be completed.  Some escaping issues have also been fixed.

Fixes: JuliaLang#55420, JuliaLang#55518, JuliaLang#55520, JuliaLang#55842, JuliaLang#56389, JuliaLang#57611
xal-0 added a commit to xal-0/julia that referenced this issue Mar 13, 2025
This commit replaces the heuristic parsing done by REPLCompletions.completions
with a new approach that parses the entire input buffer once with JuliaSyntax.
In addition to fixing bugs, the more precise parsing should allow for new
features in the future.

Some features now work in more situations "for free", like dictionary key
completion (the expression evaluated to find the keys is now more precise) and
method suggestions (arguments beyond the cursor can be used to narrow the list).

The tests have been updated to reflect slightly differing behaviour for string
and Cmd-string completion: the new code returns a character range encompassing
the entire string when completing paths (not observable by the user), and the
behaviour of '~'-expansion has be tweaked to be consistent across all places
where paths can be completed.  Some escaping issues have also been fixed.

Fixes: JuliaLang#55420, JuliaLang#55518, JuliaLang#55520, JuliaLang#55842, JuliaLang#56389, JuliaLang#57611
@giordano giordano linked a pull request Mar 14, 2025 that will close this issue
xal-0 added a commit to xal-0/julia that referenced this issue Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bisect wanted bug Indicates an unexpected problem or unintended behavior completions Tab and autocompletion in the repl regression Regression in behavior compared to a previous version REPL Julia's REPL (Read Eval Print Loop)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants