Repository navigation
[RFC]: add auto-closing brackets and quotations in REPL #1672
Description
Activity
👋 Hi there! 👋
And thank you for opening your first issue! We will get back to you shortly. 🏃 💨
- addedEnhancementIssue or pull request for enhancing existing functionality.Issue or pull request for enhancing existing functionality.RFCRequest for comments. Feature requests and proposed changes.Request for comments. Feature requests and proposed changes.REPLIssue or pull request specific to the project REPL.Issue or pull request specific to the project REPL.JavaScriptIssue involves or relates to JavaScript.Issue involves or relates to JavaScript.
on Mar 3, 2024 Thanks for opening this issue, @Snehil-Shah. By auto-closing brackets, what is the behavior you have in mind? Are you thinking behavior similar to an IDE where if you type
[or(, we automatically append]or), respectively?Thanks for opening this issue, @Snehil-Shah. By auto-closing brackets, what is the behavior you have in mind? Are you thinking behavior similar to an IDE where if you type
[or(, we automatically append]or), respectively?Yes!
Thanks for opening this issue, @Snehil-Shah. By auto-closing brackets, what is the behavior you have in mind? Are you thinking behavior similar to an IDE where if you type
[or(, we automatically append]or), respectively?If the idea is good to be implemented, I would like to work on it..
@Snehil-Shah Yes, I can see that being useful and something that the REPL currently lacks. Similar to an IDE, we'd likely want this behavior to be capable of being controlled by a setting.
If you'd like to work on this, feel free to do so.
- addedAcceptedRFC feature request which has been accepted.RFC feature request which has been accepted.
on Mar 3, 2024 Do note, however, that we'll still need to support splitting over multiple lines. Meaning, if I type
> function foo( <cursor> )
and hit ENTER where
<cursor>is (i.e., within brackets), we have some ambiguity: do we want to execute or move to the next line?Currently, when a user types an incomplete expression and hits ENTER, the cursor moves to the next line without executing the expression.
One way to support the above behavior is to support modifier keys (e.g., SHIFT+ENTER) to allow insertion of a newline when within a valid expression.
@Snehil-Shah Yes, I can see that being useful and something that the REPL currently lacks. Similar to an IDE, we'd likely want this behavior to be capable of being controlled by a setting.
If you'd like to work on this, feel free to do so.
"Controlled by a setting", do you mean an option to disable this behaviour?
Yes, that is correct. In editors, you can typically disable this setting. Some folks don't like auto-closing brackets, preferring instead to avoid magic and to manually type brackets.
- changed the title
[-][RFC]: add auto-closing brackets in REPL[/-][+][RFC]: add auto-closing brackets and quotations in REPL[/+]on Mar 3, 2024 - added a commit that references this issue
on Apr 1, 2024
Description
This RFC proposes adding auto-closing brackets in the REPL.
@kgryte @Planeshifter @Pranavchiku will this be a good addition?
Related Issues
Related Issue stdlib-js/google-summer-of-code#1
Questions
No.
Other
No.
Checklist
RFC:.