Skip to content

REPL: grab bag of tab completion issues/improvements #12274

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
SethTisue opened this issue Mar 5, 2020 · 9 comments
Open

REPL: grab bag of tab completion issues/improvements #12274

SethTisue opened this issue Mar 5, 2020 · 9 comments

Comments

@SethTisue
Copy link
Member

SethTisue commented Mar 5, 2020

if something is a blocker for some 2.13.x release, remove it from here and give it its own ticket

doc: https://github.com/jline/jline3/wiki/Completion

on the PR Som wrote:

Tried it out. Did Jline completion always tab through alternatives? Some ordinary completion is broken, however, and will need repair.

(Actually I couldn't reproduce: c tab displayed cc and was stuck. Reminiscent of #10914.)

I guess the val c: C used to be shown below the line as an explanatory result?

scala> class C
defined class C

scala> val c = new C
c: C = C@58a7dc4

scala> val c: C // c tab

@SethTisue
Copy link
Member Author

"Completion suggestions have changed when the cursor is midway through an identifier" (scala/scala#8036 (comment))

@SethTisue
Copy link
Member Author

scala/scala#7645 (comment): "I noticed that ^A ^E no longer go to line start/end all the time."

@SethTisue SethTisue changed the title JLine 3: ensure tab completion is up to snuff JLine 3: grab bag of tab completion issues/improvements Mar 7, 2020
@martijnhoekstra

This comment has been minimized.

@lrytz

This comment has been minimized.

@SethTisue

This comment has been minimized.

@SethTisue
Copy link
Member Author

I closed scala/scala-dev#698 with scala/scala#8905 but there are still a number of ways the UX could be better; 698 has some commentary with details

@SethTisue
Copy link
Member Author

scala/scala#8905 indicates whether a method is nullary, nilary, or other by showing nothing, (), or (. @lrytz suggested that it ought to insert the parens for you when you chose that completion. I believe JLine does support this through the "suffix" field. Something to try.

@SethTisue SethTisue changed the title JLine 3: grab bag of tab completion issues/improvements REPL: grab bag of tab completion issues/improvements Dec 8, 2020
@SethTisue SethTisue transferred this issue from scala/scala-dev Dec 8, 2020
@SethTisue SethTisue added this to the Backlog milestone Dec 8, 2020
@som-snytt
Copy link

I just noticed 2.13.6 // print tab completion looked like

scala> 1 + 1 // print
(1).+(1) // : Int(2)

and now it does a weird thing where it does completions but with 2 columns (blank left column) and it prints wrong when highlighting the right column. These are 3 tabs, redrawing the line:

scala> 1 + 1 // print
                       (1).+(1) // : Int(2)
scala> 1 + 1 // print
                       (1).+(1) // : Int(2)
scala> 1 + 1 // print(1).+(1) // : Int(2)
                       (1).+(1) // : Int(2)

This is on WSL, so maybe something else is going on. Or maybe the improvement to regular completions introduced this behavior for // print completion. Not worth a ticket, however.

@som-snytt
Copy link

Forgot the umbrella when I #12843 "Show me the parameters"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants