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: improve textDocument/documentLink #33505
Comments
I'm working on it |
Change https://golang.org/cl/194537 mentions this issue: |
Change https://golang.org/cl/194661 mentions this issue: |
Re-opening because not all of these features have been implemented. |
what we can do is to check at links file if the link is http | https or nothing followed by golang/go#number . I can help with it. I just need to understand it in order to don't make a lot of pr's xD |
@eduvim: If you'd like to continue work on this, I think we could add a second regex to match on |
Is there any chance that the hueristic can be disabled without also disabling import links? I'm finding the current changes pretty distracting when it thinks things are links which actually aren't, e.g.: I'd personally prefer this feature to not just accept anything that's And, if you hadn't seen it, there's already some great work in this area by @mvdan I use in another project: https://github.com/mvdan/xurls |
Thank you for the suggestion @zikaeroh! I would be in favor of us using this library to do a better job of detecting links. What do you think, @ianthehat? |
Change https://golang.org/cl/212517 mentions this issue: |
Would you need any help ? |
Our current implementation isn't robust, and it doesn't seem worth it to invest significant effort in improving it when this library exists. Also, make the protocol part of the default URL regex non-optional, as the alternative is that any string of the format "foo.bar" will appear to be a link. Updates golang/go#33505 Change-Id: Ia430a1c193eded394f8af12050bdd4dc2a9ccc94 Reviewed-on: https://go-review.googlesource.com/c/tools/+/212517 Reviewed-by: Heschi Kreinick <heschi@google.com> Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Some additional features we should add support for in
textDocument/documentLink
:Links missing(Completed via golang.org/cl/194661).http://
orhttps://
should be treated as links. For example,golang.org/issue/12345
.Links to the Go issue tracker should be treated as links. For example,.golang/go#12345
Please add any others as ideas come up.
The text was updated successfully, but these errors were encountered: