-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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) add tab completion #7827
feat(cli/repl) add tab completion #7827
Conversation
loop { | ||
for (method, params) in message_rx.try_iter() { |
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.
Make this a stream and select on it below.
Alright so right the first pass only supports a few simple scenarios single line scenarios
Next step would be for completions for multi-line "lines" based on the current cursor position
And also add support for identifier completions
|
Tested it locally - seems to work! Very nice. It only works for |
Yet to be implemented, only the rhs of propery accessors are completed at the moment 🙃 |
This comment has been minimized.
This comment has been minimized.
@caspervonb please rebase |
Will do, merge #7896 before this one please (it's freshly rebased) 🙃 |
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.
LGTM, very cool feature 🚀
In future we should consider changing colors a bit for autocompleted items or even displaying list of all possible suggestions.
There are other completion modes available, specifically there's a list list-mode that interoperates with "hints" (the one trait we haven't touched on yet in rustyline). So yeah that's open ended and should be relatively accessible for tweaking 🎉 . |
This adds tab completion for global identifiers and object properties.
Closes #3086