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 Thinking Tools

Comments

@abenz1267
Copy link

abenz1267 commented Jul 22, 2022

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 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 Thinking Tools
Projects
None yet
Development

No branches or pull requests

3 participants