Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/gopls: add examples from <pkg>/examples_test.go to hover info #54002

Open
abenz1267 opened this issue Jul 22, 2022 · 0 comments
Open
Labels
FeatureRequest gopls Issues related to the Go language server, gopls. Thinking Tools This label describes issues relating to any tools in the x/tools repository.

Comments

@abenz1267
Copy link

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.go ExampleRegexp_ReadAllString.

I tried a very naive approach just as a POC and got this result:

Screenshot_20220722_170426

Regards

@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Jul 22, 2022
@gopherbot gopherbot added this to the Unreleased milestone Jul 22, 2022
@jamalc jamalc modified the milestones: Unreleased, gopls/unplanned Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest gopls Issues related to the Go language server, gopls. Thinking Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

3 participants