Skip to content

x/tools/gopls: hover: doc links in package documentation are not rendered as links #79023

Description

@rothelius

gopls version

Details
Build info
----------
golang.org/x/tools/gopls v0.21.1
    golang.org/x/tools/gopls@v0.21.1 h1:1/o9z5Brdero4jFm9Jr46Uwj8GU9lQdoSXHMlwRHb/w=
    github.com/BurntSushi/toml@v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg=
    github.com/fatih/camelcase@v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8=
    github.com/fatih/gomodifytags@v1.17.1-0.20250423142747-f3939df9aa3c h1:dDSgAjoOMp8da3egfz0t2S+t8RGOpEmEXZubcGuc0Bg=
    github.com/fatih/structtag@v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4=
    github.com/fsnotify/fsnotify@v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
    github.com/google/go-cmp@v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
    github.com/google/jsonschema-go@v0.3.0 h1:6AH2TxVNtk3IlvkkhjrtbUc4S8AvO0Xii0DxIygDg+Q=
    github.com/modelcontextprotocol/go-sdk@v0.8.0 h1:jdsBtGzBLY287WKSIjYovOXAqtJkP+HtFQFKrZd4a6c=
    github.com/yosida95/uritemplate/v3@v3.0.2 h1:Ed3Oyj9yrmi9087+NczuL5BwkIc4wvTb5zIM+UJPGz4=
    golang.org/x/exp/typeparams@v0.0.0-20251023183803-a4bb9ffd2546 h1:HDjDiATsGqvuqvkDvgJjD1IgPrVekcSXVVE21JwvzGE=
    golang.org/x/mod@v0.30.0 h1:fDEXFVZ/fmCKProc/yAXXUijritrDzahmwwefnjoPFk=
    golang.org/x/sync@v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I=
    golang.org/x/sys@v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
    golang.org/x/telemetry@v0.0.0-20251111182119-bc8e575c7b54 h1:E2/AqCUMZGgd73TQkxUMcMla25GB9i/5HOdLr+uH7Vo=
    golang.org/x/text@v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
    golang.org/x/tools@v0.39.1-0.20260109155911-b69ac100ecb7 h1:UaaZx92hw3fDa9xRcX2//NBRE3sR4VHQLlt0TkN2geY=
    golang.org/x/vuln@v1.1.4 h1:Ju8QsuyhX3Hk8ma3CesTbO8vfJD9EvUBgHvkxHBzj0I=
    honnef.co/go/tools@v0.7.0-0.dev.0.20251022135355-8273271481d0 h1:5SXjd4ET5dYijLaf0O3aOenC0Z4ZafIWSpjUzsQaNho=
    mvdan.cc/gofumpt@v0.8.0 h1:nZUCeC2ViFaerTcYKstMmfysj6uhQrA2vJe+2vwGU6k=
    mvdan.cc/xurls/v2@v2.6.0 h1:3NTZpeTxYVWNSokW3MKeyVkz/j7uYXYiMtXRUfmjbgI=
go: go1.26.2

go env

Details
AR='ar'
CC='clang'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='clang++'
GCCGO='gccgo'
GO111MODULE='on'
GOARCH='arm64'
GOARM64='v8.0'
GOAUTH='netrc'
GOBIN='/Users/fabianr/go/bin'
GOCACHE='/Users/fabianr/Library/Caches/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/Users/fabianr/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/81/cvjd0t010fgbf1nc2p9xcq4w0000gn/T/go-build634825793=/tmp/go-build -gno-record-gcc-switches -fno-common'
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMOD='/Users/fabianr/svn/be/trunk/gamelogic/gohome/src/elk/go.mod'
GOMODCACHE='/Users/fabianr/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/fabianr/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/Users/fabianr/Library/Application Support/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.26.2'
GOWORK=''
PKG_CONFIG='pkg-config'

What did you do?

Hovered over a package name, the documentation of which contained doc links.

What did you see happen?

For e.g. the os package I get this:
Image

What did you expect to see?

The [Open], [Stat] and [*PathError] rendered as proper links.

Interestingly, the doc links in the documentation of e.g. the bytes and log packages are rendered correctly.

Editor and settings

VSCode settings.json
{
    "go.toolsManagement.autoUpdate": true,
    "telemetry.telemetryLevel": "off",
    "editor.autoClosingDelete": "always",
    "editor.tabSize": 3,
    "editor.unfoldOnClickAfterEndOfLine": true,
    "editor.unicodeHighlight.includeStrings": false,
    "indentRainbow.colors": [
        "rgba(252,255,64,0.14)",
        "rgba(74,255,64,0.14)",
        "rgba(64,228,255,0.14)",
        "rgba(144,64,255,0.14)",
        "rgba(230,64,255,0.14)",
        "rgba(255,64,64,0.14)",
        "rgba(255,173,64,0.14)"
    ],
    "go.addTags": {
        "tags": "json,action",
        "options": "json=omitempty",
        "promptForTags": false,
        "transform": "snakecase",
        "template": "",
    },
    "go.inlayHints.functionTypeParameters": true,
    "editor.minimap.showSlider": "always",
    "editor.minimap.size": "fit",
    "editor.codeActionsOnSave": {
        
    },
    "editor.guides.bracketPairs": true,
    "editor.tabCompletion": "on",
    "editor.wordWrap": "on",
    "workbench.commandPalette.experimental.suggestCommands": true,
    "workbench.editor.defaultBinaryEditor": "default",
    "workbench.editor.highlightModifiedTabs": true,
    "workbench.editor.pinnedTabsOnSeparateRow": true,
    "workbench.editor.wrapTabs": true,
    "go.editorContextMenuCommands": {
        "removeTags": true,
        "fillStruct": true,
        "testFile": true,
        "testPackage": true
    },
    "vscode-pets.throwBallWithMouse": true,
    "vscode-pets.petSize": "large",
    "go.buildTags": "force_rand_v2",
    "explorer.openEditors.sortOrder": "alphabetical",
    "editor.fontFamily": "Go Mono, Menlo, Monaco, 'Courier New', monospace",
    "editor.rulers": [
        80, 100, 120
    ],
    "cmake.showOptionsMovedNotification": false,
    "editor.unicodeHighlight.ambiguousCharacters": false,
    "workbench.editor.editorActionsLocation": "titleBar",
    "window.density.editorTabHeight": "compact",
    "workbench.editor.openSideBySideDirection": "down",
    "svnBlamer.autoBlame": true,
    "workbench.colorTheme": "Shades of Purple",
    "github.copilot.enable": {
        "*": false,
        "plaintext": false,
        "markdown": false,
        "scminput": false
    },
    "go.testEnvVars": {
    },
    "gopls": {
        "ui.diagnostic.staticcheck": true,
    },
    "terminal.external.osxExec": "iTerm.app",
    "go.inlayHints.constantValues": true,
    "svn.path": "/usr/local/bin/svn",
    "svnBlamer.svnExecutablePath": "/usr/local/bin/svn",
    "editor.fontSize": 10,
    "editor.codeLensFontFamily": "Go Mono, Menlo, Monaco, 'Courier New', monospace",
    "go.alternateTools": {},
    "go.inlayHints.ignoredError": true,
    "chat.commandCenter.enabled": false,
    "workbench.editor.showTabs": "none",
    "editor.semanticTokenColorCustomizations": {
    
    },
}

Logs

No response

Metadata

Metadata

Assignees

Labels

DocumentationIssues describing a change to documentation.ToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions