Skip to content

Commit

Permalink
[release] prepare v0.42.0 release
Browse files Browse the repository at this point in the history
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
  • Loading branch information
hyangah committed Jul 15, 2024
2 parents db1036f + c533715 commit 40b3535
Show file tree
Hide file tree
Showing 31 changed files with 429 additions and 195 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ provides rich language support for the
## Requirements

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

## Quick Start

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

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

1. Install the [VS Code Go extension].

Expand Down Expand Up @@ -95,7 +95,7 @@ extension.
<br/><em>(Toggle Test File)</em></p>

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

For better syntax highlighting, we recommend enabling
Expand Down
24 changes: 24 additions & 0 deletions docs/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
vscode-go

The MIT License (MIT)

Original Work Copyright (c) 2015-2020 Microsoft Corporation
Current Work and Modifications Copyright (c) 2020-present The Go Authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
4 changes: 2 additions & 2 deletions docs/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ command-line options.
We encourage you to give the newly added `"debugAdapter": "dlv-dap"` support a
try and to
[let us know of any issues](https://github.com/golang/vscode-go/issues/new). If
you need to use the `legacy` mode, pleasse also see the
you need to use the `legacy` mode, please also see the
[legacy remote debugging](debugging-legacy.md#remote-debugging) documentation.

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

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

We plan to make this easier in the future. Progress can be tracked
Expand Down
9 changes: 7 additions & 2 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,22 @@
## Syntax highlighting doesn't seem to work.

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

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

```json
"gopls": { "ui.semanticTokens": true }
```

If you are experiencing issues with syntax highlighting, first check if you
are using semantic highlighting. In case you did not enable semantic highlighting,
report the issues to the [go-syntax](https://github.com/worlpaker/go-syntax)
project directly.

## Code formatting by this extension doesn't seem to work.

When you have multiple formatter extensions, be sure to set this
Expand Down
29 changes: 26 additions & 3 deletions docs/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,15 @@ Format code and organize imports, either manually or on save.

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).

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).
#### Organizing imports

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.

```json
"gopls": {
"formatting.local": "example.com/myorg,github.com/myorg2"
}
```

#### Add import

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

#### Custom formatter

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"`.
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.
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:

```json
"gopls": { "fomatting.gofumpt": true }
```

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.

```json
"go.formatTools": "custom",
"go.alternateTools": {
// the binary name if it is in your PATH, or
// provide the exact path to your
// custom formatter.
"customFormatter": "golines"
}
```

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

Expand Down
Loading

0 comments on commit 40b3535

Please sign in to comment.