Git Product home page Git Product logo

Comments (7)

deviousasti avatar deviousasti commented on June 4, 2024 1

My sympathies.

from fantomas-for-vs.

deviousasti avatar deviousasti commented on June 4, 2024 1

Hi @cmeeren
I've implemented diff shrinking, so now the edit surface should be minimal.

Could you please update the extension and try it out?

from fantomas-for-vs.

deviousasti avatar deviousasti commented on June 4, 2024

Yes, this was on my to-do list.
It mostly has to do with diff-patching in Visual Studio.

https://github.com/deviousasti/fsharp-formatting-for-vs/blob/26d43ea3334313459e5c90d5fc64b513d2418313/src/FantomasHandler.cs#L122

This would ideally be a candidate for Replace instead of Delete+Insert which works, but figuring that out in an elegant way might be hard. I haven't spent too much time on it.

from fantomas-for-vs.

cmeeren avatar cmeeren commented on June 4, 2024

I have no idea how this works, but might it be so simple that you trim a single newline (\r\n or \n) from oldText and newText (if both end with the same type of newline)?

from fantomas-for-vs.

deviousasti avatar deviousasti commented on June 4, 2024

Hi, sorry about the delay in responding.
There's a set of deletes followed by a set of inserts. It's not easy to decide if a line has been truly removed, only for it to be put back. Fantomas sometimes deletes several lines worth of whitespace in one go. I'm mostly worried about edge cases which could crop up and eat someone's code.

Would you be interested in solving this with me over a Visual Studio live-share?

from fantomas-for-vs.

cmeeren avatar cmeeren commented on June 4, 2024

No worries about the delay, it's not like I'm a paying customer of a service 😅

I appreciate the invitation, but unfortunately I'm already at 120% capacity at the moment, and I think it'll stay that way for a while. 😩

from fantomas-for-vs.

cmeeren avatar cmeeren commented on June 4, 2024

Works excellently, thanks a lot! 🙌

from fantomas-for-vs.

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.