Code Monkey home page Code Monkey logo

Comments (12)

SoniEx2 avatar SoniEx2 commented on August 25, 2024 5

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

from areweideyet.

contradictioned avatar contradictioned commented on August 25, 2024 3

Gladly :)

from areweideyet.

contradictioned avatar contradictioned commented on August 25, 2024 1

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.

from areweideyet.

rosshadden avatar rosshadden commented on August 25, 2024

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

from areweideyet.

SoniEx2 avatar SoniEx2 commented on August 25, 2024

@rosshadden Can you automatically rename a function?

from areweideyet.

rosshadden avatar rosshadden commented on August 25, 2024

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.

from areweideyet.

SoniEx2 avatar SoniEx2 commented on August 25, 2024

@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.

from areweideyet.

rosshadden avatar rosshadden commented on August 25, 2024

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!

from areweideyet.

johnthagen avatar johnthagen commented on August 25, 2024

intellij-rusts refactoring is pretty powerful nowadays.

from areweideyet.

cyplo avatar cyplo commented on August 25, 2024

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

from areweideyet.

BatmanAoD avatar BatmanAoD commented on August 25, 2024

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

from areweideyet.

cyplo avatar cyplo commented on August 25, 2024

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 ?

from areweideyet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.