rescript-lang / rescript-lang/rescript-vscode
Exhaustive switch code action for selection
Open
Nobody has claimed this yet.
- Dominant language
- ReScript
- Stars
- 354
- Forks
- 63
- Avg merge
- 11h 29m
- Merged PRs (30d)
- 1
Description
Imagine selecting a range of something:
// Select the full expression below
event->JsxEvent.Keyboard.ctrlKey
...and then get a code action Exhaustive switch on selection, that would produce this:
switch event->JsxEvent.Keyboard.ctrlKey {
| true => failwith("todo")
| false => failwith("todo")
}
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 locating the existing VSCode code-action entry points for selections in this ReScript plugin. Define the exhaustive-switch action around the shown expression example, and consider the work complete when selecting an expression offers the action and produces true and false branches with the demonstrated placeholder bodies.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- vscode
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100