-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
feat(cli/repl): use completion candidate as hint #8126
feat(cli/repl): use completion candidate as hint #8126
Conversation
This shows the first completion candidate as a hint, which is rendered as gray text to the right of the cursor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed offline, needs a test case, we'll land it for 1.6.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the concept, but there is one major issue. There is a significant lag when typing or removing characters. We seem to be blocking until we get the hint from V8. We should be acquiring the hint asynchronously, and not blocking on that.
Also it would be nice if you could use the up and down keys to navigate through the hints before pressing tab. That is not strictly required for this PR to land though.
Ugh assumed the lag was my ssh connection but compared to bash on the same server indeed it is slow. Most likely won't end up landing this due to the input lag, but I'll see what can be done.
Don't think this is something the rustyline editor is currently capable of (all the interesting bits are private), but can look into it. |
@caspervonb seems we can't do much about it until kkawakam/rustyline#126 is resolved. I'm going to provisionally close this PR, let's discuss alternate approaches on Discord. |
Yup, this introduces too much latency at the moment. |
This shows the first completion candidate as a hint, which is rendered as gray text to the right of the cursor.