Skip to content

x/tools/gopls: change links in hover for replaced modules #39532

Open
@DmitriyVTitov

Description

@DmitriyVTitov
  • Run go version to get version of Go
    • go version go1.14.4 windows/amd64
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders
    • 1.45.1 x64
  • Check your installed extensions to get the version of the VS Code Go extension
    • 0.14.4
  • Run go env to get the go development environment details
set GO111MODULE=on
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\dtsp\AppData\Local\go-build
set GOENV=C:\Users\dtsp\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\dtsp\YandexDisk\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=c:\GO
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=c:\GO\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=NUL
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map

Share the Go related settings you have added/edited

    "go.testFlags": [
        "*.go": "go"
    "[go]": {},
    "go.formatTool": "goimports",
    "go.useLanguageServer": true,

Describe the bug

When I enable Go Language Server all my local Go modules become unavailable.
image

All these modules are local to project folder and are available using replace:

replace (
	transflow.ru/pkg/api v0.0.0 => ../api
	transflow.ru/pkg/assign v0.0.0 => ../assign
	transflow.ru/pkg/cache v0.0.0 => ../cache
	transflow.ru/pkg/consts v0.0.0 => ../consts
)

But even struct Server which is defined at the very same package is unavailable as you may see at screenshot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsFixThe path to resolution is known, but the work has not been done.ToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions