Skip to content

Commit

Permalink
Fix rename file and add test
Browse files Browse the repository at this point in the history
  • Loading branch information
anu-ka committed May 28, 2021
1 parent 978321d commit 55c15e3
Show file tree
Hide file tree
Showing 7 changed files with 243 additions and 172 deletions.
2 changes: 2 additions & 0 deletions jedi_language_server/text_edit_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
Range,
RenameFile,
RenameFileOptions,
ResourceOperationKind,
TextDocumentEdit,
TextEdit,
VersionedTextDocumentIdentifier,
Expand Down Expand Up @@ -58,6 +59,7 @@ def lsp_renames(self) -> Iterator[RenameFile]:
"""Get all File rename operations."""
for old_name, new_name in self.refactoring.get_renames():
yield RenameFile(
kind=ResourceOperationKind.Rename,
old_uri=old_name.as_uri(),
new_uri=new_name.as_uri(),
options=RenameFileOptions(
Expand Down
Loading

0 comments on commit 55c15e3

Please sign in to comment.