x/tools/gopls: gopls fails to find a type definition #42585
Closed
Comments
We don't offer type definitions for functions--"Go to definition" should still work though. I think #38589 might be relevant here? |
Perhaps the user's intent is unambiguous, and gopls should respond to that?
Failing that, perhaps a more user-friendly error message?
…On Fri, Nov 13, 2020 at 10:55 AM Rebecca Stambler ***@***.***> wrote:
We don't offer type definitions for functions--"Go to definition" should
still work though. I think #38589
<#38589> might be relevant here?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#42585 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABJIAI5MKEO26KTVQCU737TSPVJIVANCNFSM4TUXDJKQ>
.
|
Ok, I'll add your comment to #38589, since this issue I think is a duplicate of that one. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
at gopls tip (eeaa07dd), using vscode-insiders, open the x/tools repository
open internal/lsp/debug/serve.go
go to line 259: 'return i.State.View(path.Base(r.URL.Path))'
hover over 'View' (it says that View() returns a *cache.View)
Ask for the type definition. (It says "No type definition found for 'View'")
The type definition is found in internal/lsp/cache/view.go
Both these files are in the same module (tools/go.mod)
The text was updated successfully, but these errors were encountered: