Skip to content

Commit 0e27513

Browse files
authored
Open file in corresponding workspace
It took me some time to understand why autocomplete does not work properly. See https://stackoverflow.com/a/72743549/633961 I guess you want a different wording. Feel free to change the text of my PR. But I think a hint like this needs to be at the top of the file.
1 parent 8dfd393 commit 0e27513

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docs/troubleshooting.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ If you suspect that the Go extension is not working correctly, please follow the
88

99
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`.
1010

11+
## Open file in corresponding workspace
12+
13+
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"
14+
to open a different go module.
15+
1116
## Look for serious errors and diagnostics
1217

1318
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.
@@ -75,4 +80,4 @@ We can't diagnose a problem from just a description. When filing an issue, pleas
7580
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.`
7681
1. Extension and `gopls` logs as seems appropriate for the bug. (Include from the beginning of the logs if possible.)
7782

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

0 commit comments

Comments
 (0)