vscode-go icon indicating copy to clipboard operation
vscode-go copied to clipboard

Auto-complete in documentation string

Open varfigstar opened this issue 1 year ago • 4 comments

Problem I saw in https://go.dev/blog/godoc that there is a simple convention about documentation in golang: you should to write object's name firstly and then describe it's functionality.

Soulution What about to add auto-complete in object's documentations to avoid manually retyping it's name?

varfigstar avatar Aug 17 '24 11:08 varfigstar

The extension already provides the name as the first candidate of the completion results if you trigger completion after // . Is it not working for you? If so, please share the repro case so we can triage.

hyangah avatar Aug 19 '24 14:08 hyangah

No, it's not working for me. image

Also, nothing in extension logs.

Regular autocomplete is working.

varfigstar avatar Aug 20 '24 11:08 varfigstar

Can you please follow the step here https://github.com/golang/vscode-go/wiki/troubleshooting#collect-extension-logs

and share the log if sharing the repro case is not possible?

We also need gopls and go versions, and your editor settings.

hyangah avatar Aug 20 '24 16:08 hyangah

My representation case is simple: i have method named FromDB. When i try to make doc string for this method - there are no completion suggestions. And it also doesn't work for any other method, function, struct field...

My go version is 1.22.5 My golps version is golang.org/x/tools/gopls v0.16.1

My logs from golps after typing // Fr

logs.txt

varfigstar avatar Aug 22 '24 14:08 varfigstar