-
Notifications
You must be signed in to change notification settings - Fork 17.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/tools/gopls: reconsider placement of pkg.go.dev link in hover #36992
Comments
I'm not sure if I agree here. Placing the link at the bottom of a potentially large block of documentation would require users to scroll through the hover window to reach it (at least, in VS Code). I think the issue maybe lies more with the presentation of hover in different editors, which is why we've filed microsoft/language-server-protocol#772 in the LSP repository. I might be open to changing things around, like maybe presenting the symbol in the signature as the link, or removing the "on pkg.go.dev" piece. By the way, what editor client are you using in the screenshot here? The link should only be provided in markdown if the client supports it. |
The discussion in #33352 is also relevant here, as is the experimental solution we came up with. |
I don't quite understand why this is an issue? How often do you really want to navigate to an external site if the rest of the hover already tells you how to use the function/type? Clicking on the doc link is in my view the less common case, even in VScode.
|
I, as well as other users who requested this feature, have found it to be useful - otherwise we wouldn't have added it. We can use this issue to track user complaints with the link feature, but I don't think we should make any significant changes without more user input and more thought on how these changes should look. I would prefer that the link be easily accessible to users, and I don't think that putting it at the bottom would allow for this. I would also suggest filing an issue in the coc.vim repo about the markdown formatting. |
Yeah and that's fine, no one said that you need to get rid of the link. The issue I'm having is that you essentially say that the link is more important than the documentation itself, which I heavily disagree with. Re coc, nothing wrong with that, that's how markdown looks in vim ... TUI and all |
Hi - thanks for all the work on gopls - it keeps getting better! I'm trying to understand the idea behind this - right now, this hover is appearing in code that I've marked as private with GOPRIVATE and the link does not bring me to a real module (which is good, actually, because it's private!). Is this correct behavior? It actually gave me a scare when I first saw it... Thanks! |
Sorry about that! We actually have an open issue for respecting GOPRIVATE settings - #36998. |
Came upon this issue, and I agree with the original reporter. I'd prefer if the link were at the bottom. Seems like others agree too. @hyangah any concerns from the VS Code side if we move links to the bottom? |
Change https://go.dev/cl/393642 mentions this issue: |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
Issue
gopls v0.3.0 introduces go.dev links on hover.
While this is in principle a good thing for some, currently it adds this to the top of the hover output.
Now, this is the wrong order in my view as I don't want to switch to a browser when I have the hover documentation right there in my editor.
Can the order be switched so that it puts the link at the end of the actual docs?
That still helps the people who'd like to see the link, but it's not a waste of space if the popup window is small for some reason.
The text was updated successfully, but these errors were encountered: