Skip to content

Handle file renaming#4957

Open
VeryMilkyJoe wants to merge 2 commits into
haskell:masterfrom
VeryMilkyJoe:rename-decl-imports
Open

Handle file renaming#4957
VeryMilkyJoe wants to merge 2 commits into
haskell:masterfrom
VeryMilkyJoe:rename-decl-imports

Conversation

@VeryMilkyJoe

@VeryMilkyJoe VeryMilkyJoe commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator

Adds handling of WillRenameFile Notification to the rename plugin.

When receiving this notification, we:

  • change the module name to the new file name in the module declaration of the renamed file, and
  • change all imports of the renamed file to the new name.

Note that in the example below, there are errors after renaming because we do not edit the cabal file so the project will not build after a rename.

This is part of the implementation of #4951.

Screencast.From.2026-06-07.15-09-27.mp4

@VeryMilkyJoe VeryMilkyJoe force-pushed the rename-decl-imports branch 3 times, most recently from 5fd8c21 to 1a4dc78 Compare June 7, 2026 15:32
Add handling of WillRename Notification which changes the module
declaration and all imports of the module to rename to the new name.
Add handling of WillRename Notification which changes the module
declaration and all imports of the module to rename to the new name.
@VeryMilkyJoe VeryMilkyJoe force-pushed the rename-decl-imports branch from e521a2a to 674a1b9 Compare June 8, 2026 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant