x/tools/gopls: only use import text as range for textDocument/documentLink responses #35565
Please answer these questions before submitting your issue. Thanks!
What did you do?
Have import statements, a mix of normal imports, aliased imports,
What did you expect to see?
Links which span the package path.
What did you see instead?
The links span the entire import statement, and not just the link. See:
Note how the package aliases are also underlined, and even the
Which is just a change to:
toProtocolLink(view, m, target, n.Path.Pos()+1, n.End()-1)
(But I'm not sure if this is the correct way to get the span of a literal, just a PoC.)
The text was updated successfully, but these errors were encountered:
I will look into it later today; I typically only report issues and haven't signed the CLA (need to figure out if I can submit a patch / if I should be including my name, etc). Feel free to write something better, I'm not convinced manual tweaking of token positions is right either and I only included the tweak because it was really easy to do.