-
Notifications
You must be signed in to change notification settings - Fork 765
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
no symbols found in document #442
Comments
It looks like you have a number of language server-related features in your settings, but you don't have |
@gopherbot waitingforinfo, remove Documentation |
I omitted setting 'go.useLanguageServer', I am using language server. |
Ok, thanks for clarifying. In that case, can you please follow the steps in the |
Thanks for reply. The gopls server log out: [Trace - 14:56:52.466 PM] Sending notification '$/cancelRequest'. [Error - Received] 14:56:55.078 PM #2 context canceled [Trace - 14:56:55.078 PM] Received response 'textDocument/documentSymbol - (3)' in 2842ms. [Error - 2:56:55 PM] Request textDocument/codeAction failed. run gopls -rpc.trace -v check /path/to/file.go, log out: 2020/07/31 14:53:26 Info:2020/07/31 14:53:26 Build info golang.org/x/tools/gopls 0.4.3 Go info go version go1.14.6 linux/amd64 2020/07/31 14:53:28 Info:2020/07/31 14:53:28 go env for /mnt/e/go/src/test.com/myProject 2020/07/31 14:53:33 Info:2020/07/31 14:53:33 go/packages.Load |
Based on the output of the |
In addition to it, also please make sure this case is a duplicate of #275 (e.g. the open file belongs to the module covered by |
I guess it may be related to the gopls I took the following measures to solve this problem. |
There hasn't been any activity on this issue for a few months, so going to close this. |
What version of Go, VS Code & VS Code Go extension are you using?
go version
to get version of Gocode -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders91899dcef7b8110878ea59626991a18c8a6a1b3e
x64
go env
to get the go development environment detailsGOARCH="amd64"
GOBIN=""
GOCACHE="/home/tian/.cache/go-build"
GOENV="/home/tian/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/tian/go:/mnt/e/go"
GOPRIVATE=""
GOPROXY="https://goproxy.io"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/mnt/e/go/src/test.com/myproject/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build178762018=/tmp/go-build -gno-record-gcc-switches"
Share the Go related settings you have added/edited
"go.useLanguageServer": true,
"[go]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true,
},
// Optional: Disable snippets, as they conflict with completion ranking.
"editor.snippetSuggestions": "none",
},
"[go.mod]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true,
},
},
"gopls": {
// Add parameter placeholders when completing a function.
"usePlaceholders": true,
// If true, enable additional analyses with staticcheck.
// Warning: This will significantly increase memory usage.
"staticcheck": false,
}
Describe the bug
Steps to reproduce the behavior:
Screenshots or recordings
The text was updated successfully, but these errors were encountered: