rust-lang / rust-lang/rust-analyzer
Fill fields triggered from mid-item leaves `{}` appended when completion happens
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
See https://github.com/helix-editor/helix/issues/8263 for the details (I assumed wrongly this was an IDE issue) for a minimal viable example of the issue and feat req.
triggered the first option:
I would think the empty {} should be omitted.
I also would think that completion options for the incomplete struct name should include one that completes the name and the fields populated with todo!() rather than ().
This is a bug, but a tiny feature request to tweak the behavior of the suggestions when completing an item that has fields that can be filled in.
rust-analyzer version: rust-analyzer 1.72.0 (5680fa1 2023-08-23)
rustc version: rustc 1.72.0 (5680fa18f 2023-08-23)
relevant settings: None
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 with the minimal example and completion behavior described in the linked Helix issue, using the rust-analyzer 1.72.0 context provided here. Trace completion of an incomplete struct name and verify that the finished suggestion omits an empty {} while offering the requested field-filling behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100