Skip to content

Commit 40b3535

Browse files
committed
[release] prepare v0.42.0 release
c533715 extension/CHANGELOG.md: prepare for v0.42.0 9875794 extension/src/goTelemetry: increase the prompt rate to 5% 13eebda extension/test/integration: disable local dlv install tests 64865db extension/src/goToolsInformation: update gopls version 61901bb go.mod: update golang.org/x/telemetry dependency 5790163 extension: npm audit fix (braces, yarn) 982638e docs/features.md: add details about custom formatter setting 7a532aa extension/src/goEnv: set GOTOOLCHAIN=auto by default 4cd8eb1 extension: stop referencing go.languageServerExperimentalFeatures cb91241 extension/src/goTelemetry: set telemetry env vars c05badc extension/src/goSurvey: fix a bug in HaTS survey prompting 639ce0c extension/test/gopls: fix writeVulns tests dfdb3b8 extension/tools: update license.sh to work with extension/LICENSE 5584351 extension/tools/goplssetting: update to work with gopls v0.16.0 settings 540e146 extension/package.json: edit default launch package dir 1d1fe76 extension/src: require go1.19+ for tools installation 65d72fd extension/src/goEnvironmentStatus: fix error string 5d8af43 extension/src/util: do not use cached go version with GOTOOLCHAIN f907536 docs: fix typo in debugging.md fe57357 docs/faq.md: update the vscode default text mate rule project ff0beea extension/src/goInstallTools: strengthing minimum go version requirement It was a clean merge. Updated package.json version using npx vsce -o /tmp/go-0.42.0.vsix 0.42.0 For #3453 Change-Id: I42f33614375e38c8f24ab0a2c4f8f4d3e6ef6cab
2 parents db1036f + c533715 commit 40b3535

31 files changed

+429
-195
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ provides rich language support for the
1111
## Requirements
1212

1313
* Visual Studio Code 1.75 or newer (or editors compatible with VS Code 1.75+ APIs)
14-
* Go 1.18 or newer
14+
* Go 1.19 or newer.
1515

1616
## Quick Start
1717

1818
Welcome! 👋🏻<br/>
1919
Whether you are new to Go or an experienced Go developer, we hope this
2020
extension fits your needs and enhances your development experience.
2121

22-
1. Install [Go](https://go.dev) 1.18 or newer if you haven't already.
22+
1. Install [Go](https://go.dev) 1.19 or newer if you haven't already.
2323

2424
1. Install the [VS Code Go extension].
2525

@@ -95,7 +95,7 @@ extension.
9595
<br/><em>(Toggle Test File)</em></p>
9696

9797
**⚠️ Note**: the default syntax highlighting for Go files is provided by a
98-
[TextMate rule](https://github.com/jeff-hykin/better-go-syntax) embedded in VS
98+
[TextMate rule](https://github.com/worlpaker/go-syntax) embedded in VS
9999
Code, not by this extension.
100100

101101
For better syntax highlighting, we recommend enabling

docs/LICENSE

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
vscode-go
2+
3+
The MIT License (MIT)
4+
5+
Original Work Copyright (c) 2015-2020 Microsoft Corporation
6+
Current Work and Modifications Copyright (c) 2020-present The Go Authors
7+
8+
Permission is hereby granted, free of charge, to any person obtaining a copy
9+
of this software and associated documentation files (the "Software"), to deal
10+
in the Software without restriction, including without limitation the rights
11+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+
copies of the Software, and to permit persons to whom the Software is
13+
furnished to do so, subject to the following conditions:
14+
15+
The above copyright notice and this permission notice shall be included in all
16+
copies or substantial portions of the Software.
17+
18+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24+
SOFTWARE.

docs/debugging.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ command-line options.
822822
We encourage you to give the newly added `"debugAdapter": "dlv-dap"` support a
823823
try and to
824824
[let us know of any issues](https://github.com/golang/vscode-go/issues/new). If
825-
you need to use the `legacy` mode, pleasse also see the
825+
you need to use the `legacy` mode, please also see the
826826
[legacy remote debugging](debugging-legacy.md#remote-debugging) documentation.
827827

828828
For example, start external headless server:
@@ -1050,7 +1050,7 @@ in the module cache, vendored modules, and the standard library.
10501050
```
10511051

10521052
Since rules are applied both from client to server and server to client,
1053-
rules with an empty string will be applied to *all* paths that it sees, so even
1053+
rules with an empty string will be applied to _all_ paths that it sees, so even
10541054
dependencies will be mapped to `"/path/to/module"`.
10551055

10561056
We plan to make this easier in the future. Progress can be tracked

docs/faq.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,22 @@
55
## Syntax highlighting doesn't seem to work.
66

77
The default syntax highlighting for Go files is provided by a
8-
[TextMate rule](https://github.com/jeff-hykin/better-go-syntax) embedded in VS Code,
8+
[TextMate rule](https://github.com/worlpaker/go-syntax) embedded in VS Code,
99
not by this extension.
1010

11-
For better syntax highlighting (including generics support), we recommend enabling
11+
For accurate syntax highlighting (including generics support), we recommend enabling
1212
[semantic highlighting](https://code.visualstudio.com/api/language-extensions/semantic-highlight-guide)
1313
by turning on [Gopls' `ui.semanticTokens` setting](settings.md#uisemantictokens).
1414

1515
```json
1616
"gopls": { "ui.semanticTokens": true }
1717
```
1818

19+
If you are experiencing issues with syntax highlighting, first check if you
20+
are using semantic highlighting. In case you did not enable semantic highlighting,
21+
report the issues to the [go-syntax](https://github.com/worlpaker/go-syntax)
22+
project directly.
23+
1924
## Code formatting by this extension doesn't seem to work.
2025

2126
When you have multiple formatter extensions, be sure to set this

docs/features.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,15 @@ Format code and organize imports, either manually or on save.
194194

195195
The extension formats Go code, organizes imports, and removes unused imports by default. For different behavior, please override per-language default settings following [the instruction](advanced.md#formatting-code-and-organizing-imports).
196196

197-
When organizing imports, the imported packages are grouped in the default `goimports` style. In order to group some packages after 3rd-party packages, use [`"gopls": { "formatting.local": <comma-separated imports prefix>}`](settings.md#formattinglocal).
197+
#### Organizing imports
198+
199+
When organizing imports, the imported packages are grouped in the default `goimports` style. In order to group some packages after 3rd-party packages, use the [`"formatting.local"`](settings.md#formattinglocal) setting.
200+
201+
```json
202+
"gopls": {
203+
"formatting.local": "example.com/myorg,github.com/myorg2"
204+
}
205+
```
198206

199207
#### Add import
200208

@@ -204,8 +212,23 @@ The extension organizes imports automatically and can add missing imports if the
204212

205213
#### Custom formatter
206214

207-
In addition to the default `gofmt`-style formatter, the Go language server supports `gofumpt`-style formatting. You can enable `gofumpt` formatting by setting `"gopls.formatting.gofumpt"`.
208-
You can also configure to use other custom formatter by using the `"go.formatTool"` setting. The custom formatter must operate on file contents from STDIN, and output the formatted result to STDOUT.
215+
In addition to the default [`go fmt`](https://pkg.go.dev/cmd/gofmt) style formatter, the language server (`gopls`) supports `github.com/mvdan/gofumpt` style formmating. Use gopls's [`formatting.gofumpt`](settings.md#formattinggofumpt) setting:
216+
217+
```json
218+
"gopls": { "fomatting.gofumpt": true }
219+
```
220+
221+
You can also configure to use other custom formatter (`golines`) by using the `"go.formatTool"` setting. The custom formatter must operate on file contents from STDIN, and output the formatted result to STDOUT.
222+
223+
```json
224+
"go.formatTools": "custom",
225+
"go.alternateTools": {
226+
// the binary name if it is in your PATH, or
227+
// provide the exact path to your
228+
// custom formatter.
229+
"customFormatter": "golines"
230+
}
231+
```
209232

210233
### [Rename symbol](https://code.visualstudio.com/docs/editor/refactoring#_rename-symbol)
211234

0 commit comments

Comments
 (0)