Skip to content

Commit 3c000ca

Browse files
adonovangopherbot
authored andcommitted
gopls/doc: relnote for hover & definition over doc links
Change-Id: I2d3a571a6fabd1419212b64706f765a058a3cc11 Reviewed-on: https://go-review.googlesource.com/c/tools/+/578320 Auto-Submit: Alan Donovan <[email protected]> Reviewed-by: Robert Findley <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent c859ee9 commit 3c000ca

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

gopls/doc/release/v0.16.0.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,30 @@ optimizations to your data structures, or when reading assembly code.
8585

8686
TODO: example hover image.
8787

88+
### Hover and definition on doc links
89+
90+
Go 1.19 added support for [links in doc
91+
comments](https://go.dev/doc/comment#links), allowing the
92+
documentation for one symbol to reference another:
93+
94+
TODO: turn the code below into a VS Code screenshot of hover.
95+
96+
```go
97+
// Logf logs a message formatted in the manner of [fmt.Printf].
98+
func Logf(format string, args ...any)
99+
```
100+
101+
Gopls's Hover and Definition operations now treat these links just
102+
like identifiers, so hovering over one will display information about
103+
the symbol, and "Go to definition" will navigate to its declaration.
104+
Thanks to @rogeryk for contributing this feature.
105+
106+
88107
## Bugs fixed
89108

90109
## Thank you to our contributors!
91110

92111
@guodongli-google for the `unusedwrite` analyzer.
93-
TODO: they're a xoogler; is there a more current GH account?
112+
TODO: they're a xoogler; is there a more current GH account?
113+
114+
@rogeryk

0 commit comments

Comments
 (0)