rescript-lang / rescript-lang/rescript-lang.org
Add keyboard shortcut for formatting and preserve cursor position
Open
@tsnobip is already working on this.
Since Feb 11, 2025.
playground
- Dominant language
- MDX
- Stars
- 1.9k
- Forks
- 260
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 17
Description
Add a keyboard shortcut for formatting.
Currently, the cursor position gets lost after pressing it, which makes this feel very awkward. Try to preserve it.
This might only be solved by upgrading to CodeMirror 6 (https://codemirror.net/docs/migration/), which utilizes offsets instead of line coordinates.
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.
Assessment
This issue has not been assessed yet.