paolodellepiane / vscode-fantomas-fmt

MIT License
17 stars 4 forks source link

formatting in vscode always fail #16

Closed wyshmily closed 4 years ago

wyshmily commented 4 years ago

Always get this information when formatting in vs code : image

And here is the log output : image

The temp file is written correctly, but the source file remains the old format. I've tried to restart my computer, doesn't help.

klanthier commented 4 years ago

I have the same issue happening to me, @wyshmily have you found a solution to that problem ?

martinbryant commented 4 years ago

I was also having the same problem, so I forked the repo and ran the debugger in vscode and the following screenshot is from the console.

image

It seems as if this method was part of the proposedApi in vscode and is now deprecated as per https://code.visualstudio.com/updates/v1_39#_integrated-terminal

I have spent time trying to get this api to act the same with the extension but with no success, so I am looking at a potential rewrite unless anyone else can come up with a solution. That is if I can figure out how to run the fantomas tool in a shell instead of the terminal

martinbryant commented 4 years ago

@wyshmily @klanthier I have sent an email to @pd29 to ask about his plans to update this extension.

In case he does not reply or does not wish to continue to support this, I have created my own version of the extension. Would either of you be willing to try it out/work with me to get this released?

klanthier commented 4 years ago

@martinbryant I would certainly be interested to give it a shot and help you out with it ! Send me the details and I'll see what I can do

martinbryant commented 4 years ago

@klanthier ok nice one. I'm going to commit what I have done at some point today so I will edit this post later with the link to the repo:)

New Repo

paolodellepiane commented 4 years ago

hi, it should be fixed now. thanks @martinbryant , I took a look at your repository and merged your solution

bmingles commented 4 years ago

I am getting this error with fresh install but no details as to why.

martinbryant commented 4 years ago

@paolodellepiane thank you and glad it could help. It taught me a lot about vscode extensions.

I’ll be honest though I have not used it since Ionide uses the fs auto complete project which in turn uses Fantomas for formatting - https://ionide.io/Tools/fsac.html - I hope this might help @bmingles

I do not know if you can customise the settings for formatting as I have been happy with the way it works out of the box