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:
Jeremy Kolb 2020-12-22 14:19:51 -05:00
parent 27ccde9ce9
commit 4f989cfa08
5 changed files with 92 additions and 6 deletions

View file

@ -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,