areweideyet
areweideyet copied to clipboard
Refactoring is a must-have feature and no IDE supports it yet
Please add refactoring to the list.
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.
rust.vim has refactoring support, with rustfmt
. Is that what you mean, @SoniEx2 ?
@rosshadden Can you automatically rename a function?
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 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.
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!
Apparently intellij-rust has partial support for refactoring (source).
intellij-rusts refactoring is pretty powerful nowadays.
Would you accept a PR adding refactoring info, now that some IDEs support it ?
Gladly :)
@cyplo Do you know offhand which IDEs do have support so far?
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 ?