mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Implement workspace/willRenameFiles for single-level file moves
Renames modules during file rename if they're in the same directory.
This commit is contained in:
parent
27ccde9ce9
commit
4f989cfa08
5 changed files with 92 additions and 6 deletions
|
@ -535,6 +535,14 @@ impl Analysis {
|
|||
self.with_db(|db| references::rename::prepare_rename(db, position))
|
||||
}
|
||||
|
||||
pub fn will_rename_file(
|
||||
&self,
|
||||
file_id: FileId,
|
||||
new_name_stem: &str,
|
||||
) -> Cancelable<Option<SourceChange>> {
|
||||
self.with_db(|db| references::rename::will_rename_file(db, file_id, new_name_stem))
|
||||
}
|
||||
|
||||
pub fn structural_search_replace(
|
||||
&self,
|
||||
query: &str,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue