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

Autocompletion for variables not available on wasm32 target

Open mbrc12 opened this issue 2 years ago • 0 comments

With the setting target="wasm32-unknown-unknown", rust-analyzer refuses to autocomplete methods on variables. This behavior doesn't happen on the usual x64 target. Here is screenshot of the issue, where it doesn't recognize the window variable defined outside. Similar things happen for the event_loop variable as well.

image

This example is from this small example: https://github.com/mbrc12/rust-analyzer-example/ , compiled using wasm-pack build --target web.

Might this be a setup error from my side? My rust-analyzer settings for this project are here: https://github.com/mbrc12/rust-analyzer-example/blob/main/.nlsp/rust_analyzer.json .

Many thanks for the help!

mbrc12 avatar Dec 15 '23 06:12 mbrc12