Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Signature Help and Quick Info do not show function comments for unexported functions #567

Closed
mousetraps opened this issue Oct 26, 2016 · 3 comments

Comments

@mousetraps
Copy link

Smoke testing, Windows

In the example below, I would expect the "hello" comment to appear in addition to just the function signature.
image

This works fine for cases like stringutil.Reverse
image

@ramya-rao-a ramya-rao-a changed the title tooltips for function calls do not include leading trivia for function definitions Signature Help and Quick Info do not show function comments for functions in main.go Oct 28, 2016
@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Oct 28, 2016

Exported functions from shared libraries seem to show the comments, but none from main.go which is a special go file meant for executables vs shared code.

Definitely a bug

@ramya-rao-a ramya-rao-a changed the title Signature Help and Quick Info do not show function comments for functions in main.go Signature Help and Quick Info do not show function comments for unexported functions in packages and all functions in main.go Oct 31, 2016
@ramya-rao-a
Copy link
Contributor

We use godoc to get the function documentation to display in Signature Help and Quick Info on hover.

godoc is meant to show documentation for exported members of packages.

Which is why no member in main.go or unexported members of packages do not get the documentation info.

Replacing bug label with enhancement

@ramya-rao-a ramya-rao-a changed the title Signature Help and Quick Info do not show function comments for unexported functions in packages and all functions in main.go Signature Help and Quick Info do not show function comments for unexported functions Nov 20, 2016
@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Nov 21, 2016

In the latest update of the Go extension (0.6.50), we now support the use of gogetdoc for Goto/Peek Definition, Hover info and Signature Help features. Add "go.docsTool": "gogetdoc" to your setting to enable the use of gogetdoc, reload/restart VS Code and that should fix this issue.

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants