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

Doc package links should be clickable #3374

Closed
tylerbrandt opened this issue May 2, 2024 · 2 comments
Closed

Doc package links should be clickable #3374

tylerbrandt opened this issue May 2, 2024 · 2 comments
Milestone

Comments

@tylerbrandt
Copy link

Is your feature request related to a problem? Please describe.

It is a bit frustrating that when I format links in a doc comment like [package.Symbol], [github.com/fully-qualified/package], or [symbol], which are all formats that pkgsite supports (https://tip.golang.org/doc/comment#doclinks), vscode-go doesn't do anything with those. If they happen to be links that VS Code recognizes (like fully-qualified GitHub links) it'll open those in the browser, but this isn't what I want either (it should go to the pkg.go.dev page for that package).

Describe the solution you'd like
The link should act like a Go type mention (hover over shows preview of docs, command-click goes to definition). Ideally also it would change the syntax highlighting to indicate that this is a "valid" link (which is a productivity boon when authoring such comments, particularly since typos are common and sometimes there's weird gotchas with the formatting). Goland has a really nice implementation of this with both features:

Screenshot 2024-05-02 at 10 52 01 AM

Describe alternatives you've considered
I have resorted to running a live-updating entr -r pkgsite command in the console and using the browser. But it would be nice if I didn't have to leave my editor for that!

Additional context

Demo app which has these kinds of links in it: https://github.com/tylerbrandt/godoc-example

@gopherbot gopherbot added this to the Untriaged milestone May 2, 2024
@suzmue
Copy link
Contributor

suzmue commented May 6, 2024

I believe this is the same feature request as this upstream feature request in golang/go#61677. Please feel free to add your support to that request by reacting or commenting on that issue!

I am going to close this issue as a duplicate of golang/go#61677, but if you believe this is an error, feel free to reopen.

@suzmue suzmue closed this as completed May 6, 2024
@tylerbrandt
Copy link
Author

Ok, I didn’t know this was the language server responsibility but 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants