How to enable HTML links in VS Code parameter hint?

On OSX I installed current releases of VS Code, and Rust tools via rustup; zero previous experience with either.

Rust-analyzer extension installed; rls extension not installed.

Everything I have tested works OK with Rust hello-world, except the parameter-hint pop-up (e.g., when hovering over println!).

The pop-up includes clickable links that appear to me to be paths to locally-installed HTML doc files, e.g., "../std/macro-format.html".

My current setup does not have these local files, so clicking the link produces "Unable to open" dialog.

If the problem is just that I have not installed Rust HTML doc files locally, is there a standard, simple way to do that?

Thanks!

If you have installed Rust using rustup, you can install the documentation with

rustup component add rust-docs

Thank you for this suggestion.

I ran "rustup component add rust-docs", and found that the HTML files actually were already installed on my macOS system under ~/.rustup.

I tested my VS Code installation first with the rust-analyzer extension installed, then with rls extension installed.

For my Rust hello-world test source, the parameter-hint pop-ups appeared only with the rust-analyzer extension installed.

That suggests to me that maybe the problem is in rust-analyzer extension code, in which case it might be helpful for me to file a bug report.

When I click the link for "format!" in the parameter-hint pop-up for a println! in my test code, there is an unsuccessful attempt to open the file "/std/macro.format.html".

As a test, I made a symlink so that /std/macro.format.html could be opened. Clicking the link in the pop-up actually did open this file in text mode in VS Code. I'm guessing that the intent is to instead open this HTML file in a web-browser tab.

Thanks again for your help with this.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.