rust-analyzer icon indicating copy to clipboard operation
rust-analyzer copied to clipboard

Enable the VS Code extension on vscode.dev

Open ChaiTRex opened this issue 3 years ago • 3 comments

Please add support to use the rust-analyzer VS Code extension on vscode.dev. Currently, it says The 'rust-analyzer' extension is not available in Visual Studio Code for the Web.

This may depend on #11244.

ChaiTRex avatar Jan 17 '22 19:01 ChaiTRex

It does depend on that, and it's quite hard to implement (even though @HKalbasi has worked wonders before). You should keep in mind that rust-analyzer uses cargo to get the project metadata and show compiler diagnostics, and rust-src for anything that involves std or core .

lnicola avatar Jan 17 '22 19:01 lnicola

If it would make it any easier: It would be a big help (as per 80/20 Pareto rule) to have even just some rust-analyzer functionality available for vscode.dev. For example, if it were showing just

  • the inferred types of variables, and
  • parameter/field names in function calls/implicit constructors/pattern matching, then navigating through code at vscode.dev would be much more ergonomic.

Thank you for considering.

peter-lyons-kehl avatar Sep 11 '22 16:09 peter-lyons-kehl

We can't do any meaningful type inference without the source code of libstd and libcore. And we can't offer any IDE features for code in external crates.

lnicola avatar Sep 11 '22 16:09 lnicola