Skip to content

Commit

Permalink
sync: merge microsoft/vscode-go@ecd5824 into master
Browse files Browse the repository at this point in the history
- Modifications to README.md, .github/ISSUE_TEMPLATE, .github/PULL_REQUEST_TEMPLATE
- Addition of .github/SUPPORT.md

Change-Id: I11777f1dc643acd0e2b7b190d54f905925f7c79f
  • Loading branch information
hyangah committed May 17, 2020
2 parents 6e2ad76 + ecd5824 commit 36bc7da
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 35 deletions.
21 changes: 9 additions & 12 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ assignees: ''
---

Please direct general questions to:
- [Gitter](https://gitter.im/Microsoft/vscode-go)
- [Gophers Slack](https://invite.slack.golangbridge.org/messages/vscode)
- [`#vscode` channel in Gophers Slack](https://invite.slack.golangbridge.org/messages/vscode)

Please review the [Wiki](https://github.com/microsoft/vscode-go/wiki) before filing an issue.
Please review the [documentation](https://github.com/golang/vscode-go/tree/master/docs) before filing an issue.
Helpful pages include:
- [GOPATH](https://github.com/Microsoft/vscode-go/wiki/GOPATH-in-the-VS-Code-Go-extension)
- [Module Support](https://github.com/microsoft/vscode-go/wiki/Go-modules-support-in-Visual-Studio-Code)
- [Debugging](https://github.com/Microsoft/vscode-go/wiki/Debugging-Go-code-using-VS-Code)
- [GOPATH](https://github.com/golang/vscode-go/tree/master/docs/GOPATH-in-the-VS-Code-Go-extension.md)
- [Module Support](https://github.com/golang/vscode-go/tree/master/docs/Go-modules-support-in-Visual-Studio-Code.md)
- [Debugging](https://github.com/golang/vscode-go/tree/master/docs/Debugging-Go-code-using-VS-Code.md)
- Set "trace": "log" and share the resulting logs in the debug console when logging an issue.

Please answer these questions before submitting your issue. Thanks!
Expand All @@ -27,13 +26,13 @@ Please answer these questions before submitting your issue. Thanks!
- <Paste VS Code version here>
- Check your installed extensions to get the version of the VS Code Go extension
- <Paste Go extension version here>
- Run `go env GOOS GOARCH` to get the operating system and processor architecture details
- <Paste OS and arch details here>
- Run `go env` to get the go development environment details
- <Paste the output here>

### Share the Go related settings you have added/edited

Run `Preferences: Open Settings (JSON)` command to open your settings.json file.
Share all the settings with the `go.` or `["go"]` prefixes.
Share all the settings with the `go.` or `["go"]` or `gopls` prefixes.

### Describe the bug
A clear and concise description of what the bug.
Expand All @@ -45,6 +44,4 @@ A clear and concise description of what you expected to happen.
3. See error

### Screenshots or recordings
If applicable, add screenshots or recordings to help explain your problem.


If applicable, add screenshots or recordings to help explain your problem.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Question
url: https://invite.slack.golangbridge.org/
about: Ask and answer questions on the `#vscode` channel in Gophers Slacks.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ assignees: ''

---

If you have a question, please ask it on https://gitter.im/Microsoft/vscode-go or on the VSCode channel in Gophers Slack(https://invite.slack.golangbridge.org/)
If you have a question, please ask it on the `#vscode` or `#vscode-go` channels in Gophers Slack](https://invite.slack.golangbridge.org/messages/vscode).

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Expand Down
24 changes: 24 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
This PR will be imported into Gerrit with the title and first
comment (this text) used to generate the subject and body of
the Gerrit change.

**Please ensure you adhere to every item in this list.**

More info can be found at https://github.com/golang/go/wiki/CommitMessage

+ The PR title is formatted as follows: `frob the quux before blarfing`
+ The part after the colon uses the verb tense + phrase that completes the blank in,
"This change modifies Go to ___________"
+ Lowercase verb after the colon
+ No trailing period
+ Keep the title as short as possible. ideally under 76 characters or shorter
+ No Markdown
+ The first PR comment (this one) is wrapped at 76 characters, unless it's
really needed (ASCII art, table, or long link)
+ If there is a corresponding issue, add either `Fixes golang/vscode-go#1234` or `Updates golang/vscode-go#1234`
(the latter if this is not a complete fix) to this comment
+ If referring to a repo, you can use the `owner/repo#issue_number` syntax:
`Fixes golang/tools#1234`
+ We do not use Signed-off-by lines in Go. Please don't add them.
Our Gerrit server & GitHub bots enforce CLA compliance instead.
+ Delete these instructions once you have read and applied them
4 changes: 0 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md

This file was deleted.

6 changes: 6 additions & 0 deletions .github/SUPPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
For asking questions, visit:

* `#vscode` channel in [Gophers Slack](https://gophers.slack.com) for general questions.
* `#vscode-dev` channel in [Gophers Slack](https://gophers.slack.com) for extension development-related questions.

Use the [invite app](https://invite.slack.golangbridge.org/) for access.
35 changes: 18 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Go for Visual Studio Code

[![Join the chat at https://gitter.im/Microsoft/vscode-go](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Microsoft/vscode-go?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://travis-ci.org/Microsoft/vscode-go.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-go)
[![Slack](https://img.shields.io/badge/slack-gophers-green.svg?style=flat)](https://gophers.slack.com/messages/vscode/)

This extension adds rich language support for the [Go language](https://golang.org/) to VS Code.

Read the [Changelog](https://github.com/Microsoft/vscode-go/blob/master/CHANGELOG.md) to know what has changed over the last few versions of this extension.
See the [Changelog](https://github.com/Microsoft/vscode-go/blob/master/CHANGELOG.md) to know what has changed over the last few versions of this extension.

> This is the future home for the VS Code Go extension. Please follow the progress of the migration work [here](https://github.com/microsoft/vscode-go/issues/3247).
## Table of Contents

Expand Down Expand Up @@ -87,31 +89,30 @@ This extension requires the `go` tools. See [Go's installation guide](https://go

Install and open [Visual Studio Code](https://code.visualstudio.com). Press `Ctrl+Shift+X` or `Cmd+Shift+X` to open the Extensions pane. Find and install the Go extension. You can also install the extension from the [Marketplace](https://marketplace.visualstudio.com/items?itemName=ms-vscode.Go). Open any `.go` file in VS Code. The extension is now activated.

This extension uses a set of Go tools to provide the various rich features. These tools are installed in your GOPATH by default. If you wish to have these tools in a separate location, provide the desired location in the setting `go.toolsGopath`. Read more about this and the tools at [Go tools that the Go extension depends on](https://github.com/Microsoft/vscode-go/wiki/Go-tools-that-the-Go-extension-depends-on).
This extension uses a set of Go tools to provide the various rich features. These tools are installed in your GOPATH by default. If you wish to have these tools in a separate location, provide the desired location in the setting `go.toolsGopath`. Read more about this and the tools at [Go tools that the Go extension depends on](https://github.com/microsoft/vscode-go/blob/master/docs/Go-tools-that-the-Go-extension-depends-on.md).

You will see `Analysis Tools Missing` in the bottom right, clicking this will offer to install all of the dependent Go tools. You can also run the [command](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) `Go: Install/Update tools` to install/update the same. You need to have git installed for these tool installations to work.

**Note 1**: Read [GOPATH in the VS Code Go extension](https://github.com/Microsoft/vscode-go/wiki/GOPATH-in-the-VS-Code-Go-extension) to learn about the different ways you can get the extension to set GOPATH.
**Note 1**: Read [GOPATH in the VS Code Go extension](https://github.com/Microsoft/vscode-go/blob/master/docs/GOPATH-in-the-VS-Code-Go-extension.md) to learn about the different ways you can get the extension to set GOPATH.

**Note 2**: The `Format on save` feature has a timeout of 750ms after which the formatting is aborted. You can change this timeout using the setting `editor.formatOnSaveTimeout`. This feature gets disabled when you have enabled the `Auto Save` feature in Visual Studio Code.

**Note 3**: Unless `go.useLanguageServer` is set to `true`, this extension uses `gocode` to provide completion lists as you type. If you have disabled the `go.buildOnSave` setting, then you may not get fresh results from not-yet-built dependencies. Therefore, ensure you have built your dependencies manually in such cases.

### Customizing the Go extension features

The Go extension is ready to use on the get go. If you want to customize the features, you can edit the settings in your User or Workspace settings. Read [All Settings & Commands in Visual Studio Code Go extension](https://github.com/Microsoft/vscode-go/wiki/All-Settings-&-Commands-in-Visual-Studio-Code-Go-extension) for the full list of options and their descriptions.
The Go extension is ready to use on the get go. If you want to customize the features, you can edit the settings in your User or Workspace settings. Read [All Settings & Commands in Visual Studio Code Go extension](https://github.com/Microsoft/vscode-go/blob/master/docs/All-Settings-&-Commands-in-Visual-Studio-Code-Go-extension.md) for the full list of options and their descriptions.


### Go Language Server

The Go extension uses a host of [Go tools](https://github.com/Microsoft/vscode-go/wiki/Go-tools-that-the-Go-extension-depends-on) to provide the various language features. An alternative is to use a single language server that provides the same features using the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/)
The Go extension uses a host of [Go tools](https://github.com/Microsoft/vscode-go/blob/master/docs/Go-tools-that-the-Go-extension-depends-on.md) to provide the various language features. An alternative is to use a single language server that provides the same features using the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/).

Previously, we added support to use `go-langserver`, the [language server from Sourcegraph](https://github.com/sourcegraph/go-langserver). There is no active development for it anymore and it doesn't support Go modules. Therefore, we are now switching to use `gopls`, the [language server from Google](https://github.com/golang/go/wiki/gopls) which is currently in active development.
[`gopls`](https://golang.org/s/gopls/README.md) from Google is the official language server for
the Go language and is currently in active development. You can choose to use this by setting
`go.useLanguageServer` to `true` in your settings.

- If you are already using the language server from Sourcegraph, you can continue to use it as long as you are not using Go modules. We do suggest you to move to using `gopls` though.
- To do so, delete the `go-langserver` binary/executable in your machine and this extension will prompt you to install `gopls` after a reload of the VS Code window.
- If you are working on a project that uses Go modules, you will be prompted to use the language server from Google as it provides much better support for Go modules.
- If you have never used language server before, and now opt to use it, you will be prompted to install and use the language server from Google as long as you are using a Go version > 1.10.
If you are working on a project that uses Go modules, you will be prompted to use the language server as it provides much better support for Go modules.

> Note: The language server from Google supports Go version > 1.10 only
Expand Down Expand Up @@ -209,32 +210,32 @@ A few of these are available in the editor context menu as an experimental featu

### _Optional_: Debugging

To use the debugger, you must currently manually [install delve](https://github.com/derekparker/delve/tree/master/Documentation/installation). For more read [Debugging Go Code Using VS Code](https://github.com/Microsoft/vscode-go/wiki/Debugging-Go-code-using-VS-Code).
To use the debugger, you must currently manually [install delve](https://github.com/derekparker/delve/tree/master/Documentation/installation). For more read [Debugging Go Code Using VS Code](https://github.com/microsoft/vscode-go/blob/master/docs/Debugging-Go-code-using-VS-Code.md).

#### Debugging in WSL

If using WSL on Windows, you will need the WSL 2 Linux kernel. See [WSL 2 Installation](https://docs.microsoft.com/en-us/windows/wsl/wsl2-install) and note the Window 10 build version requirements.

#### Remote Debugging

To remote debug using VS Code, read [Remote Debugging](https://github.com/Microsoft/vscode-go/wiki/Debugging-Go-code-using-VS-Code#remote-debugging).
To remote debug using VS Code, read [Remote Debugging](https://github.com/microsoft/vscode-go/blob/master/docs/Debugging-Go-code-using-VS-Code.md#remote-debugging).

## Install or update all dependencies

To quickly get all dependencies installed (or updated) see the [Go Tools wiki page](https://github.com/Microsoft/vscode-go/wiki/Go-tools-that-the-Go-extension-depends-on).
To quickly get all dependencies installed (or updated) see the [Go Tools wiki page](https://github.com/microsoft/vscode-go/blob/master/docs/Go-tools-that-the-Go-extension-depends-on.md).

## Building and Debugging the Extension

You can set up a development environment for debugging the extension during extension development.
Read more at [Building, Debugging and Sideloading the extension in Visual Studio Code](https://github.com/Microsoft/vscode-go/wiki/Building,-Debugging-and-Sideloading-the-extension-in-Visual-Studio-Code).
Read more at [Building, Debugging and Sideloading the extension in Visual Studio Code](https://github.com/microsoft/vscode-go/blob/master/docs/Building,-Debugging-and-Sideloading-the-extension-in-Visual-Studio-Code.md).

## Tools this extension depends on

This extension uses a host of Go tools to provide the various rich features. These tools are installed in your GOPATH by default. If you wish to have the extension use a separate GOPATH for its tools, provide the desired location in the setting `go.toolsGopath`. Read more about this and the tools at [Go tools that the Go extension depends on](https://github.com/Microsoft/vscode-go/wiki/Go-tools-that-the-Go-extension-depends-on).
This extension uses a host of Go tools to provide the various rich features. These tools are installed in your GOPATH by default. If you wish to have the extension use a separate GOPATH for its tools, provide the desired location in the setting `go.toolsGopath`. Read more about this and the tools at [Go tools that the Go extension depends on](https://github.com/microsoft/vscode-go/blob/master/docs/Go-tools-that-the-Go-extension-depends-on.md).

## Frequently Asked Questions (FAQ)

Please see our wiki on [Frequently Asked Questions](https://github.com/Microsoft/vscode-go/wiki/Go-with-VS-Code-FAQ-and-Troubleshooting) to get answers to your questions or get started with troubleshooting.
Please see our wiki on [Frequently Asked Questions](https://github.com/microsoft/vscode-go/blob/master/docs/Go-with-VS-Code-FAQ-and-Troubleshooting.md) to get answers to your questions or get started with troubleshooting.

## Contributing

Expand Down
1 change: 0 additions & 1 deletion docs/Go-tools-that-the-Go-extension-depends-on.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ There are other features of this extension which you most probably wouldn't be u
- [impl](https://github.com/josharian/impl) for generating stubs for interfaces
- [gotype-live](https://github.com/tylerb/gotype-live) for providing diagnostics as you type
- [gotests](https://github.com/cweill/gotests/) for generating unit tests
- [go-langserver](https://github.com/sourcegraph/go-langserver) for using the Go language server by Sourcegraph
- [fillstruct](https://github.com/davidrjenni/reftools/tree/master/cmd/fillstruct) for filling a struct literal with default values

You can install all these tools at once by running the command `Go: Install/Update Tools`. The same command can be used to keep the tools up to date as well as to re-compile in case you change the version of Go being used.
Expand Down

0 comments on commit 36bc7da

Please sign in to comment.