intellij-elm
intellij-elm copied to clipboard
Add "Move module members" refactoring
You have no idea how happy I am to see fresh efforts on supporting elm in intellij!
THANK YOU!
So, what i'm asking for, here, is moving function/type alias/value from one file to another, while updating it's references throughout the project. With typescript, it looks like this:
![screen shot 2018-02-10 at 14 27 53](https://user-images.githubusercontent.com/3199950/36062521-a4fc2b54-0e6e-11e8-9622-bf9afc88564a.png)
![screen shot 2018-02-10 at 14 30 19](https://user-images.githubusercontent.com/3199950/36062573-93a6e83e-0e6f-11e8-8207-7446aeccce6f.png)
Yes, this would be fairly easy to do. The reference system works, so it should be relatively easy to move the value definition and find all the files where you need to update the imports.
This would probably be a medium-hard difficulty task for a contributor. My recommendation would be to look at how the Rust plugin (from JetBrains) implements similar functionality. My plugin is heavily based on the architecture of the Rust plugin. The Rust plugin is an especially good source for finding efficient ways to write tests for new functionality such as this.
In terms of inserting new imports, a lot of that code has already been implemented to support the ‘add import’ intention on unresolved references.
That's nice. But maybe I should rephrase the question, can we expect you to do it? :}
It’s a good idea, but I don’t have much spare time. It might be 6 months before I get around to it.
🤘
Keith, if I could somehow.. bribe.. you.. to get this out there? Like.. a beer.. or.. ten?