Disable spaces around expressions when code formatting using go plugin?
已回答
Hi Everyone,
When using the go plugin, I noted that when formatting go files it removes spaces between expressions by default. I looked in the "Code Style" settings to see if there was a way to disable this, but was not able to find anything. Is there a way to prevent the IDE from removing spaces from my expressions?
For example:
SomeMethod(A + B + C)
becomes:
SomeMethod(A+B+C)
请先登录再写评论。
Hello,
It is intended in gofmt formatter (Go default formatter).
Please see https://groups.google.com/g/golang-nuts/c/PbJ1uTbhFDY for details.
There is no way to change that behavior and it is strongly recommended to apply gofmt rules.
I hope it helps.