You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+100Lines changed: 100 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,106 @@ https://margo.sh/b/motd - Get notified when GoSublime has a new release.
10
10
11
11
## Changes
12
12
13
+
## 20.06.14
14
+
15
+
This release contains a number of features and bug fixes that have been worked on over the last few months.
16
+
17
+
_You will need to restart Sublime Text for all changes to take effect_
18
+
19
+
- Add new GoCmd{} option `Humanize` to make `go test` and `go re/play` (in test mdoe) output more readable (using https://github.com/dustin/go-humanize).
20
+
21
+
- large numbers are split up using commas
22
+
- 123456 ns/op is converted to µs/op, etc.
23
+
- 123456 B/op is converted to KiB/op, etc.
24
+
25
+
To enabled it, use:
26
+
27
+
&golang.GoCmd{
28
+
Humanize: true,
29
+
}
30
+
31
+
e.g. output:
32
+
33
+
goos: linux
34
+
goarch: amd64
35
+
pkg: margo.sh/vfs
36
+
BenchmarkPoke/Miss-8 388,868 2.952 µs/op
37
+
BenchmarkPoke/Hit-8 1,739,704 684 ns/op
38
+
PASS
39
+
40
+
Known bugs:
41
+
42
+
- The output fields are not aligned
43
+
44
+
- Add new reducer golang.GoGenerate
45
+
46
+
It adds a UserCmd (cord `ctrl/cmd+.`,`ctrl/cmd+.c`) named `Go Generate` that calls `go generate` in the closest go package (current dir or parent dirs).
47
+
48
+
It can be enabled with:
49
+
50
+
&golang.GoGenerate{
51
+
Args: []string{"-v", "-x"},
52
+
},
53
+
54
+
- Auto-completion now works when the line ends with a dot (.)
55
+
56
+
- Add new reducer golang.AsmFmt
57
+
58
+
It does code fmt'ing for `.s` files using https://github.com/klauspost/asmfmt
59
+
60
+
It formats `.s` files when they are saved, or the fmt cord `ctrl+.`,`ctrl.f` is pressed.
61
+
62
+
- Add new reducer &web.Prettier{}
63
+
64
+
It does code fmt'ing using https://github.com/prettier/prettier
65
+
By default It fmt's CSS, HTML, JS, JSON, JSX, SVG, TS, TSX and XML files.
66
+
67
+
To specify the list of langs to fmt set the `Langs` field:
68
+
69
+
&web.Prettier{
70
+
// Langs: []mg.Lang{mg.JS}, // only fmt .js files
71
+
Langs: web.PrettierDefaultLangs,
72
+
},
73
+
74
+
You might also need to `import "margo.sh/web"`.
75
+
76
+
You will need to install prettier separately.
77
+
78
+
- Add new Lang constants: mg.HTML, mg.SVG and mg.XML
79
+
80
+
- Add mgutil.SplitWriter a writer that writes to an underlying writer in split chunks e.g. lines somewhat similar to bufio.scanner
81
+
82
+
-`go.play` and `go.replay` (cord `ctrl/cmd+.`,`ctrl/cmd+r`) now works in in unsaved `_test.go` files.
83
+
84
+
-`go.replay` now runs the Benchmark\* func surrounding the cursor.
85
+
86
+
Compared to `ctrl/cmd+shift+left-click`, it also runs tests.
87
+
88
+
Known bugs:
89
+
90
+
- It currently ignores the TestArgs and BenchmarkArgs options of the golang.TestCmds reducer.
91
+
92
+
- mg.CmdCtx supports a new option `Verbose`,
93
+
94
+
When `cx.Verbose = true`the commands that are run are printed to the output prefixed with `#`.
95
+
96
+
e.g. output:
97
+
98
+
[ `replay` | done ]
99
+
# go test -test.run=. -test.bench=^BenchmarkPoke$
100
+
goos: linux
101
+
[...]
102
+
103
+
It's enabled for `go.play` and `go.replay` (cord `ctrl/cmd+.`,`ctrl/cmd+r`).
104
+
105
+
- Issues without a valid tag are now defaulted to `mg.Error` instead of being ignored.
106
+
107
+
This fixes some cases where the error palette shows errors, but the status and HUD doesn't.
108
+
109
+
- Fix some cases where issues are reported in the wrong file or incorrectly anchored to the current file.
110
+
111
+
- goutil.IsPkgDir() and other functions now use the VFS, so should touch the disk less.
0 commit comments