Skip to content

Commit 385cc7f

Browse files
committed
REPL: JuliaSyntax completions overhaul
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: #55420, #55518, #55520, #55842, #56389, #57611
1 parent aaa906c commit 385cc7f

File tree

4 files changed

+572
-632
lines changed

4 files changed

+572
-632
lines changed

stdlib/REPL/src/REPL.jl

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ import .LineEdit:
8686
PromptState,
8787
mode_idx
8888

89+
include("SyntaxUtil.jl")
8990
include("REPLCompletions.jl")
9091
using .REPLCompletions
9192

0 commit comments

Comments
 (0)