vscode
vscode copied to clipboard
"Follow link" hover is not linkified on markdown links
Verifying https://github.com/microsoft/vscode/issues/153094, with that sample text
![image](https://user-images.githubusercontent.com/323878/186286737-93c57e95-9841-46b1-9fad-7795cea9b4b7.png)
Elsewhere, the Follow Link is a link
![image](https://user-images.githubusercontent.com/323878/186286855-408ac3f3-d6eb-4ee5-ae51-ac33970ce7ca.png)
@jrieken The root cause of this is that markdown lazily resolves link targets. This means that when we try to compute the hover message for the link decoration, we end up thinking there is no link.url
so we don't create a markdown link:
https://github.com/microsoft/vscode/blob/b51955e4c878c8facdd775709740c8aa5d1192d6/src/vs/editor/contrib/links/browser/links.ts#L339
I'm going to add a placeholder link target
in the markdown extension to fix this. Leaving up to you if we should also fix this in core
Looks like resolve should be called not just on open but also on hover
I wasn't able to work around this as a language server. If I switch the server to return a fake uri instead of no uri, resolve
is no longer called on the documentLink
A related case.
In this case, the link (@just-web/contributions
) is not underscored (i.e. not rendered as a link thus not hover/clickable).
The other 3 are working fine.
I have tested this with all extensions disabled.
@unional That's not related to this issue. Please file an new issue with markdown text that demonstrates the problem
I want to add that for link definitions that start with ^
is not recognized. Maybe I should start a new issue?