elm-language-client-vscode
elm-language-client-vscode copied to clipboard
Renaming a copied module refactors references to the orignal module
Expected Behavior
When I have a module A with import B. And I Copy/Paste module B and then rename the copied module I would expect that the other modules remain untouched.
Current Behavior
When renaming B copy.elm to C.elm the import in module A gets changed from import B to import C.
Possible Solution
It seems the language server still associates the copied module with the original module, which should not be the case. Also it might be good to check if the module name is valid and matches the file name before doing any refactoring.
Steps to Reproduce (for bugs)
- Create module
Awithimport B - Create module
B - Copy/Paste module
B - Rename
B copy.elmtoC.elm
Context
This issue might be related: #298
Your Environment
- Version used: 2.4.1
- Editor name and version (e.g. VSCode 1.36.1): VSCode 1.68.1
- Environment name and version (e.g. node.js 5.4): node.js 16.15.1
- Operating System and version: Windows 11 Home