Hello. I'm here to propose an idea for gopls. The idea is that when we
hover over `func` token of a function literal whose type is documented, the
documentation of the type can be shown.
The motivating example is as follows:
filepath.WalkDir(dir, func(path string, d os.DirEntry, err error) error {
...
}
When I am coding filepath.WalkDir, whose signature is `func
filepath.WalkDir(root string, fn fs.WalkDirFunc) error`, I don't know
what's the meaning of the third parameter `err` of `fs.WalkDirFunc`. I have
to go to the browser to see documentation or ask LLM.
If we can decide the type of function literal is `fs.WalkDirFunc` and if
`fs.WalkDirFunc` is documented, can we show documentation when hovering
over `func` token? This is a similar behavior like hovering over function
name of a call statement I think.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/golang-nuts/48e1c8de-6ad0-412d-9435-e806e9978967n%40googlegroups.com.