问题
I have a LSP server that returns hovers/tooltips containing links.
If I link to an HTML file on the web (https://...
) when you click it it opens that link in the browser.
If I link to a local HTML file (file://...
) it opens that HTML file in VSCode, as if you wanted to edit the file.
Is there any way to make it open the local HTML file in your browser?
Edit 1: I found the code that handles this. Seems it just checks for http
, https
or mailto
and opens those externally. Everything else it opens with VSCode.
Edit 2: Found an identical issue. Looks like there is code to work around this here and here
来源:https://stackoverflow.com/questions/51059189/visual-studio-code-link-to-local-html-file