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

Comments

@flw-cn
Copy link

@flw-cn 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

@stamblerre stamblerre 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.

@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 this to the Unreleased milestone Sep 16, 2020
@stamblerre stamblerre removed this from the Unreleased milestone Sep 16, 2020
@gopherbot gopherbot added this to the Unreleased milestone Sep 16, 2020
@flw-cn
Copy link
Author

@flw-cn 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!

@stamblerre stamblerre closed this Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.