Skip to content

Commit

Permalink
Merge branch 'master' into go-test-background-arg
Browse files Browse the repository at this point in the history
  • Loading branch information
leep-frog committed May 25, 2024
2 parents aeebba9 + 65d72fd commit 38b4cbb
Show file tree
Hide file tree
Showing 74 changed files with 1,421 additions and 732 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-long-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
version: ['stable', 'insiders']
go: ['1.18', '1.19', '1.20', '1.21']
go: ['1.19', '1.20', '1.21', '1.22']

steps:
- name: Clone repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-long.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest] # TODO: reenable macos-latest
version: ['stable']
go: ['1.18', '1.19', '1.20', '1.21']
go: ['1.19', '1.20', '1.21', '1.22']

steps:
- name: Clone repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
go-version: '1.22'
check-latest: true
cache: true

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wiki.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
go-version: '1.22'
check-latest: true
cache: true
cache-dependency-path: '**/go.sum'
Expand Down
6 changes: 6 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
"VSCODE_GO_IN_TEST": "1", // Disable code that shouldn't be used in test
"MOCHA_TIMEOUT": "999999",
},
"outFiles": [
"${workspaceFolder}/extension/out/**/*.js"
],
"sourceMaps": true,
"smartStep": true,
"preLaunchTask": "npm: watch",
Expand All @@ -71,6 +74,9 @@
"env": {
"VSCODE_GO_IN_TEST": "1" // Disable code that shouldn't be used in test
},
"outFiles": [
"${workspaceFolder}/extension/out/**/*.js"
],
"sourceMaps": true,
"preLaunchTask": "npm: watch",
"cwd": "${workspaceFolder}/extension"
Expand Down
34 changes: 15 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,17 @@ extension fits your needs and enhances your development experience.

1. Install the [VS Code Go extension].

1. Open any directory or workspace containing Go code to automatically activate
the extension. The
1. Open any Go file or go.mod file to automatically activate the extension. The
[Go status bar](https://github.com/golang/vscode-go/wiki/ui) appears in the
bottom left corner of the window and displays your Go version.
bottom right corner of the window and displays your Go version.

1. The extension depends on `go`, `gopls`, `dlv` and other optional tools. If
any of the dependencies are missing, the ⚠️ `Analysis Tools Missing` warning
is displayed. Click on the warning to download dependencies.

See the
[tools documentation](https://github.com/golang/vscode-go/wiki/tools) for a
complete list of tools the extension depends on.
1. The extension depends on `go`, `gopls` (the Go language server), and optional
tools depending on your settings. If `gopls` is missing, the extension will
try to install it. The :zap: sign next to the Go version indicates
the language server is running, and you are ready to go.

<p align="center">
<img src="docs/images/installtools.gif" width=75%>
<img src="docs/images/gettingstarted.gif" width=75%>
<br/>
<em>(Install Missing Tools)</em>
</p>
Expand All @@ -52,7 +48,8 @@ You are ready to Go :-) &nbsp;&nbsp; 🎉🎉🎉
and [advanced topics](https://github.com/golang/vscode-go/wiki/advanced) to
customize the extension.
* View the [tools documentation](https://github.com/golang/vscode-go/wiki/tools)
for a complete list of tools the VS Code Go extension depends on.
for a complete list of tools the VS Code Go extension depends on. You can
install additional tools and update them by using "Go: Install/Update Tools".
* Solve issues with the
[general troubleshooting](https://github.com/golang/vscode-go/wiki/troubleshooting)
and [debugging troubleshooting](https://github.com/golang/vscode-go/wiki/debugging#troubleshooting)
Expand Down Expand Up @@ -98,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 Expand Up @@ -136,9 +133,9 @@ nightly build of this extension. Learn how to install it in by reading the

## Telemetry

VS Code Go extension relies on the [Go Telemetry](https://telemetry.go.dev) to
VS Code Go extension relies on the [Go Telemetry](https://go.dev/doc/telemetry) to
learn insights about the performance and stability of the extension and the
language server (`gopls``).
language server (`gopls`).
**Go Telemetry data uploading is disabled by default** and can be enabled
with the following command:

Expand All @@ -151,7 +148,7 @@ traces to [telemetry.go.dev](https://telemetry.go.dev). You can inspect what
data is collected and can be uploaded by running:

```
go run golang.org/x/telemetry/cmdgotelemetry@latest view
go run golang.org/x/telemetry/cmd/gotelemetry@latest view
```

If we get enough adoption, this data can significantly advance the pace of
Expand All @@ -174,9 +171,8 @@ of reliability. For example:
These are just a few ways that telemetry can improve gopls. The [telemetry blog
post series](https://research.swtch.com/telemetry-uses) contains many more.

Go telemetry is designed to be transparent and privacy-preserving. If you have
concerns about enabling telemetry, you can learn more at
[https://telemetry.go.dev/privacy](https://telemetry.go.dev/privacy).
Go telemetry is designed to be transparent and privacy-preserving. Learn more at
[https://go.dev/doc/telemetry](https://go.dev/doc/telemetry).

## Contributing

Expand Down
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
Binary file added docs/images/gettingstarted.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/goexplorer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/images/gopls.png
Binary file not shown.
Binary file added docs/images/gostatusbar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/languagestatusbar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/images/selectGoVersion.png
Binary file not shown.
Binary file removed docs/images/statusbarmenu.png
Binary file not shown.
Loading

0 comments on commit 38b4cbb

Please sign in to comment.