Closed
Labels
Description
Description
In some other editors (i.e. VS Code), Prettier can be configured to format on save. It would be great to have this functionality in Visual Studio as well.
I am not sure how feasible this is as it is likely largely dependent on the capabilities of a VS extensions. Can anyone provide any insight into the level of difficulty for something like this? I am happy to look into it myself and potentially in attempt a contribution for it if the effort is realistic.
Thanks!
Reacted by Tom Seldon, Porkopek, Frank Tan, Ravindranath Desai, Michael DeRazon, Hai Thanh Nguyen, David Mohundro, Azeet Chebrolu, Swann Le Vigouroux, Tyler and 2 more
Activity
SwannLV commentedon May 2, 2018
This would be the perfection.
jesperbjensen commentedon May 22, 2018
I’m all for it. If someone wants to help out with this feature it would be awesome. (You need to be able to turn it on and off)
tommck commentedon Jul 15, 2018
I'm working on this right now, but it's proving difficult. The
IVsRunningDocTableEvents3is all Sync methods when all the currentNodeProcessstuff is async.I may have to make a sync version of the methods in there unless @madskristensen or @jesperbjensen have any better ideas.
Also need to figure out how to make it load at startup/opening of a solution
tommck commentedon Aug 26, 2018
I figured out a hacked way. PR incoming
Adding Format On Save Option (#6) (#24)
jesperbjensen commentedon Sep 6, 2018
So this feature should be available in the CI build: http://vsixgallery.com/extension/J1da7ad9e-85b3-4a0c-8e45-b2ae59a575a7/
Thanks to @tommck for implementing the feature. 👍🎉
tommck commentedon Sep 7, 2018
Do we have plans for a release any time soon? Just curious
madskristensen commentedon Sep 7, 2018
@tommck, I can publish any time. Did you test the CI build @jesperbjensen linked to?
tommck commentedon Sep 7, 2018
uhh.. .lemme try that now :)
tommck commentedon Sep 7, 2018
Yep, it's working fine. You were OK with the hacked up way I did that, @madskristensen ?
madskristensen commentedon Sep 7, 2018
Yes I am
tommck commentedon Sep 9, 2018
Wait, don't publish this if you haven't already
UPDATE: Never mind.. local change issue :)
UPDATE 2: NOT a local change issue. Don't publish this. The extension crashes every time you save on a non-supported file type. I will fix that
Fixed 2 bugs related to #6 (#25)