Skip to content
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: suppress adding URLs to hover #41417

Closed
flw-cn opened this issue Sep 16, 2020 · 2 comments
Closed

x/tools/gopls: suppress adding URLs to hover #41417

flw-cn opened this issue Sep 16, 2020 · 2 comments
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@flw-cn
Copy link

flw-cn commented Sep 16, 2020

In vim, the URL in the hover document given by gopls is actually unclickable because the popup window does not capture focus. However, the presence of these URLs can affect the sentence flow of the document text.

I know there's a feature in vim called conceal that hides them, but since URLs are usually long, actually hiding them leaves a huge black hole, like this:

image

I looked at the source code for these modules and found that the original documentation comments did not contain URLs, so they should have been added actively by gopls.

I know that some GUI editors like vscode have this feature that is very useful, as they often have an integrated browser that can easily display what the link is pointing to. But in other term-based editors, actually opening the URL is not very convenient and breaks the train of thought.

So is it possible to request an option to turn this feature off?

@stamblerre
Copy link
Contributor

This feature is available through the linksInHover setting: https://github.com/golang/tools/blob/master/gopls/doc/settings.md#linksinhover-bool.

@stamblerre stamblerre changed the title [FEATURE REQUEST] Option to suppress adding URLs to hover document x/tools/gopls: suppress adding URLs to hover Sep 16, 2020
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Sep 16, 2020
@gopherbot gopherbot added this to the Unreleased milestone Sep 16, 2020
@stamblerre stamblerre added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. and removed Documentation Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Sep 16, 2020
@stamblerre stamblerre removed this from the Unreleased milestone Sep 16, 2020
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Sep 16, 2020
@gopherbot gopherbot added this to the Unreleased milestone Sep 16, 2020
@flw-cn
Copy link
Author

flw-cn commented Sep 16, 2020

This feature is available through the linksInHover setting: https://github.com/golang/tools/blob/master/gopls/doc/settings.md#linksinhover-bool.

Thanks! It does work!

@golang golang locked and limited conversation to collaborators Sep 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants