x/tools/gopls: add examples from <pkg>/examples_test.go to hover info #54002
Labels
FeatureRequest
Issues asking for a new feature that does not need a proposal.
gopls
Issues related to the Go language server, gopls.
Thinking
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
Hello everyone,
i'd be a good addition to add an option to show code examples for hover. I figured out pkg.go.dev simply parses the packages
example_test.go
file/function. So f.e. regexp.ReadAllString -> regexp/examples_test.goExampleRegexp_ReadAllString
.I tried a very naive approach just as a POC and got this result:
Regards
The text was updated successfully, but these errors were encountered: