Open ayoub-benali opened 2 years ago
Thanks for reporting! What is the invalid link that this opens?
scala.collection.immutable.StringOps
is the invalid link as you can see it in the hover response above
scala.collection.immutable.StringOps
is the invalid link as you can see it in the hover response above
Ach, right! I looked at the other link in the response.
(note) It'll be easier to do this after https://github.com/scalameta/metals/pull/3378 is merged.
Is there any way we could potentially get the needle moving on this? I just moved from a jetbrains setup to vscode+metals recently and if I'm understanding things correctly most of the documentation linking I have in my project is broken related to this issue š
I'm sadly not well-versed in the project so this wouldn't exactly be a quickfix with my skillset, but I can take this issue if there are no plans for this to be taken otherwise.
I talk a quick look into that and got something working in https://github.com/scalameta/metals/pull/4813
However, I am not super happy about the solution with relative links, which might break at times. I will check if there are better solutions for it.
I worked a bit on this in https://github.com/tgodzik/metals/commit/7bebb91e5c5fe4936d7adaafbb00b8e7415bb735
I might get back to it at some point, but as it stands if anyone else wants to take a look that's would be cool.
This issue is still present in current Metals versions, and still leads to "Unable to open " errors even when interacting with official types in Predef.scala
, such as the links in the tooltip for String
, which end up linking to scala.collection.StringOps
instead of documentation on (or navigation to) the type. While this issue was not closed or claimed to be resolved, I wanted to make sure that the keywords I began by searching for would also lead here.
After searching for documentation covering this as the "correct" way to link types in Scaladoc, I found that it's described in the Scaladoc3 guide.
Describe the bug The hover response contains invalid scaladoc links
To Reproduce
String
typescala.collection.immutable.StringOps
linkBellow is the LSP log
Expected behavior This kind of scaladoc links should probably be rewritten by metals and be replace by a
goto-position
command. Ultimately the link should trigger a valid action.Installation:
Search terms hover, scaladoc