Skip to content

Commit d7d7880

Browse files
committed
Prep v20.06.14
1 parent 0c704a7 commit d7d7880

File tree

2 files changed

+101
-1
lines changed

2 files changed

+101
-1
lines changed

CHANGELOG.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,106 @@ https://margo.sh/b/motd - Get notified when GoSublime has a new release.
1010

1111
## Changes
1212

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.
112+
13113
## 20.03.09
14114

15115
This release fixes a couple bugs:

gosubl/about.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import re
22
import sublime
33

4-
TAG = '20.03.09-1'
4+
TAG = '20.06.14-1'
55
ANN = 'a'+TAG
66
VERSION = 'r'+TAG
77
VERSION_PAT = re.compile(r'\d{2}[.]\d{2}[.]\d{2}-\d+', re.IGNORECASE)

0 commit comments

Comments
 (0)