Support helping editors maintain marks and positions
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 24
Description
To continue what I've written up in https://github.com/rust-lang/rust.vim/issues/287 :
Running a reformatter from the context of an editor, raises the expectation that the editor will not lose its cursor position, marks, various highlights, and more.
However, only rustfmt can reliably relate between pre-reformatting and post-reformatting token positions, being that it performs the reformatting. Perhaps a list of token positions can be passed as input to rustfmt, and then their new positions can outputted?
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 reading issue #287 and the discussion in this issue to understand the editor-position requirements. Investigate how rustfmt could receive token positions and report their post-formatting positions; done would mean editors can preserve cursor positions, marks, and highlights across reformatting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100