Support for custom event handler
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 818
- Forks
- 249
- Avg merge
- 4d 14h
- Merged PRs (30d)
- 30
Description
Support for custom event handler
I am currently using Reedline to develop a console for a custom language. And I am trying to implement the following feature:
- Automatically add indent when
enteris hit but validator says input is incomplete.
>>> if 3:
... a = 5
... a<-- next line should start here
- Automatic delete 4 spaces when
deleteis hit. My console treats tab as 4 spaces so I bindTabkey to automatically insert 4 spaces but I can not letdeleteto behave correspondingly. For example, delete 4 space if there are 4 before the cursor, otherwise delete a single character if there is any.
>>> <-- delete all 4 previous space here
>>> asbds<-- only delete `s` from buffer
There are also an option that a special event is made for indent handling. But it could be more useful and extensive if user defined handler for ReedlineEvent can be supported.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how ReedlineEvent, key bindings, validation, and the Tab binding are handled. Determine how a user-defined event handler could support indentation on incomplete input and context-sensitive deletion. Done means the handler API supports these behaviors without requiring special built-in indent events.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100