GoSublime icon indicating copy to clipboard operation
GoSublime copied to clipboard

Add option to run `gofmt -s` as a Formatter

Open jlhawn opened this issue 6 years ago • 1 comments

In the past, I would set fmt_cmd to ["gofmt", "-s"]. I recently realized that this is not what the builtin golang.GoFmt does as it does not also simplify the code. This patch adds this option as a builtin reducer.

jlhawn avatar Feb 22 '19 02:02 jlhawn

Thanks for the PR, but changes in margo should be submitted upstream at https://github.com/KurokuLabs/margo

Also, for this case - and those where the code has no dependency on margo's internals - please submit to https://github.com/KurokuLabs/margo-contrib instead. You just copy disableGsFmt, commonFmtLangs and commonFmtActions; they will never change.

DisposaBoy avatar Feb 24 '19 11:02 DisposaBoy