areweideyet icon indicating copy to clipboard operation
areweideyet copied to clipboard

Refactoring is a must-have feature and no IDE supports it yet

Open SoniEx2 opened this issue 8 years ago • 12 comments

Please add refactoring to the list.

SoniEx2 avatar Nov 25 '15 14:11 SoniEx2

Actually, this is the reason why I did not add it (yet).

But I see the point that IDE users expect it to be there... maybe adding it below the list as information is better.

contradictioned avatar Nov 26 '15 07:11 contradictioned

rust.vim has refactoring support, with rustfmt. Is that what you mean, @SoniEx2 ?

rosshadden avatar Dec 07 '16 04:12 rosshadden

@rosshadden Can you automatically rename a function?

SoniEx2 avatar Dec 07 '16 21:12 SoniEx2

No idea, sorry. I don't actually use or like autoformatting code, I just know that rustfmt normalizes whitespace and some other things. I should probably have stayed silent since I don't know anything about it or what you were looking for.

rosshadden avatar Dec 07 '16 21:12 rosshadden

@rosshadden Say you have a function f, and your project has well over 500 files. Say this function f is very important to your project and so it is used a lot. Say you wanna rename it to g.

Now you have to go to every one of those 500 files and replace all calls to f with calls to g.

However, with refactoring, you rightclick the function f, click rename, type in g, and it does all that for you.

SoniEx2 avatar Dec 07 '16 21:12 SoniEx2

Oh, okay, that makes sense. I've always used sed for such things, but I do know (and appreciate) what you're referring to. tern for JavaScript has that functionality, and I thought it was very cool, just never ended up implementing it into my workflow.

Cool!

rosshadden avatar Dec 08 '16 03:12 rosshadden

Apparently intellij-rust has partial support for refactoring (source).

SoniEx2 avatar Dec 08 '16 22:12 SoniEx2

intellij-rusts refactoring is pretty powerful nowadays.

johnthagen avatar Jul 01 '17 13:07 johnthagen

Would you accept a PR adding refactoring info, now that some IDEs support it ?

cyplo avatar Dec 03 '17 14:12 cyplo

Gladly :)

contradictioned avatar Dec 03 '17 15:12 contradictioned

@cyplo Do you know offhand which IDEs do have support so far?

BatmanAoD avatar May 28 '19 15:05 BatmanAoD

Hi, CLion with Rust plugin supports some simpler refactorings, not sure about the others.

It may be interesting to have a more detailed view there on the website, listing some popular refactoring and which IDE supports which ? E.g. extract function vs extract module vs inline function etc ?

cyplo avatar May 28 '19 15:05 cyplo