rust-lang / rust-lang/rust-analyzer
[feature request] Automatically rename a module when a file/directory is renamed
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
I think there's enough information available to do this. For example, renaming foo.rs to bar.rs should automatically change mod foo to mod bar.
This should probably be behind an option, because this might not always be what's expected.
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
The issue names no files, tests, or entry points. Start by tracing rust-analyzer's handling of file and directory renames and how module names are resolved, then investigate where an opt-in setting would belong. Done means a rename such as foo.rs to bar.rs can update mod foo to mod bar when enabled, while preserving existing behavior by default.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100