-
Notifications
You must be signed in to change notification settings - Fork 646
Godoc not appearing in code-completion #194
Comments
Yes - ideally we'll show the GoDoc information in QuickInfo and Completion as well. Currently we only show it in SignatureHelp. Should be fairly straightforward to integrate with these other features as well. |
We are blocked on nsf/gocode#415 to get the docs during completion. As of now we have docs in Signature Help and Quick Info. |
One way we could achieve this is
Will not work for pkg with alias |
Just a heads-up that there's now a PR to |
Note that there is even a VS Code API meant for this case: CompletionItemProvider.resolveCompletionItem. |
That is a good idea @segevfiner Using If anyone is interested in picking up this item, here are a few code pointers:
|
Using `go doc` instead of `godoc` due to golang/go#25443 `go doc` doesn't support giving the code of an unsaved file via stdin like `gocode`, so it won't display documentation for unsaved changes. TODO: Make sure this works for all cases, the current file, main package, etc... Fixes microsoft#194
Using `go doc` instead of `godoc` due to golang/go#25443 `go doc` doesn't seem to support giving the code of an unsaved file via stdin like `gocode`, so it won't display documentation for unsaved changes. Fixes microsoft#194
Using `go doc` instead of `godoc` due to golang/go#25443 `go doc` doesn't seem to support giving the code of an unsaved file via stdin like `gocode`, so it won't display documentation for unsaved changes. Fixes microsoft#194
* Add item documentation to completions Using `go doc` instead of `godoc` due to golang/go#25443 `go doc` doesn't seem to support giving the code of an unsaved file via stdin like `gocode`, so it won't display documentation for unsaved changes. Fixes #194 * Code review fixes for #2054 * Refactoring and comments * Always resolve the item * Prompt for updating gocode if the package property is missing
This long pending feature is now out in the latest update of this extension (0.7.0) |
Hi Luke.
System:
Godoc does not appear when using code-completion.
In this animation we have some code written on the right pane which calls a function from the code on the left pane. You see that the func

GetGroupIDsOfUser
has a comment, however, it does not appear in the code-completion:Godoc should appear when:
The godocs do not show up on my own code, however, when using the

fmt
package as an example, it only shows itself sometimes:The text was updated successfully, but these errors were encountered: