Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gofumpt to the format tools #2438

Closed
klaidliadon opened this issue Apr 11, 2019 · 5 comments

Comments

Projects
None yet
2 participants
@klaidliadon
Copy link

commented Apr 11, 2019

The gofumpt tool should be added to the accepted format tools:

https://github.com/mvdan/gofumpt

@ramya-rao-a

This comment has been minimized.

Copy link
Member

commented Apr 11, 2019

Have you tried installing gofumpt and then adding the below setting

"go.alternateTools": {
   " goformat": "gofumpt"
}

This will make the extension use gofumpt in the place of the goreturns (which is the default formatting tool)

If you have changed the setting go.formatTool to something else, then use that instead of goreturns above

@ramya-rao-a

This comment has been minimized.

Copy link
Member

commented Apr 11, 2019

Feel free to re-open this issue or add a comment if you have trouble making the above work

@klaidliadon

This comment has been minimized.

Copy link
Author

commented Apr 11, 2019

Hi, I tried your method but it does not seem to work:
image

@ramya-rao-a

This comment has been minimized.

Copy link
Member

commented Apr 11, 2019

Sorry, I made a mistake there. Try

"go.formatTool": "goreturns",
"go.alternateTools": {
   " goreturns": "gofumpt"
}
@klaidliadon

This comment has been minimized.

Copy link
Author

commented Apr 12, 2019

This works, thanks!

@vscodebot vscodebot bot locked and limited conversation to collaborators May 26, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.