Skip to content

[RFC]: Add auto-completion preview for REPL #1775

Closed
@tudor-pagu

Description

@tudor-pagu

Description

This RFC proposes adding a gray preview for auto-completion in the cases where the completer decides that there is only one valid completion. This aims to be similar to the behaviour of the node.js REPL:
image
After seeing the preview, the user can press tab for the completion to be filled in normally. Additionally, to mimic the node.js REPL, if the user presses the up arrow, the completion should also be filled in, and if the user presses enter the completion should be filled in and the line should be executed.

Related Issues

Related issue stdlib-js/google-summer-of-code#1
This issue also involves adding a listener for every key press in the REPL: #1672

Questions

Is the behaviour I proposed when pressing up/enter good? Are there any other interactions which I've missed that I should implement?

Other

No.

Checklist

  • I have read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.
  • The issue name begins with RFC:.

Metadata

Metadata

Assignees

Labels

AcceptedRFC feature request which has been accepted.EnhancementIssue or pull request for enhancing existing functionality.JavaScriptIssue involves or relates to JavaScript.REPLIssue or pull request specific to the project REPL.RFCRequest for comments. Feature requests and proposed changes.difficulty: 3Likely to be challenging but manageable.priority: NormalNormal priority concern or feature request.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions