Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open file in corresponding workspace #2305

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ If you suspect that the Go extension is not working correctly, please follow the

Verify that your project is in good shape by working with it at the command line. Running a command like `go build ./...` in the workspace directory will compile everything. For modules, `go mod tidy` is another good check, though it may modify your `go.mod`.

## Open file in corresponding workspace

Make sure the you edit belongs to your module. If you open a file from a different module, then autocomplete might not work. Use "Open Folder"
to open a different go module.

## Look for serious errors and diagnostics

Check that there aren't any diagnostics that indicate a problem with your workspace. First, check the bottom-center of the VS Code window for any errors. After that, check the package declaration of the any Go files you're working in, and your `go.mod` file. Problems in the workspace configuration can cause many different symptoms. See the [`gopls` workspace setup instructions](https://github.com/golang/tools/blob/master/gopls/doc/workspace.md) for help.
Expand Down Expand Up @@ -75,4 +80,4 @@ We can't diagnose a problem from just a description. When filing an issue, pleas
1. Relevant VS Code settings: run `Preferences: Open Settings (JSON)` and include anything in a `[go]` block, and anything that starts with `go.` or `gopls.`
1. Extension and `gopls` logs as seems appropriate for the bug. (Include from the beginning of the logs if possible.)

Once you've collected that information, [file your issue](https://github.com/golang/vscode-go/issues/new/choose).
Once you've collected that information, [file your issue](https://github.com/golang/vscode-go/issues/new/choose).