Skip to content

no symbols found in document #442

@bingoIsCoder

Description

@bingoIsCoder

What version of Go, VS Code & VS Code Go extension are you using?

  • Run go version to get version of Go
    • go version go1.14.6 linux/amd64
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders
    • 1.47.3
      91899dcef7b8110878ea59626991a18c8a6a1b3e
      x64
  • Check your installed extensions to get the version of the VS Code Go extension
    • 0.15.2
  • Run go env to get the go development environment details
    • GO111MODULE="on"
      GOARCH="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

  1. vscode OUTLINE show: no symbols found in document 'myfile.go'
  2. go to definition not working in this file

Steps to reproduce the behavior:

Screenshots or recordings

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeWaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions