Vs code autocompletion doesn't work with azul

i'm going through this lesson. For some reason autocompletion works well when i type use azul::, it suggests me corresponding modules, but when i want to include modules from azul::widgets::, it stops working. It also doesn't autocomplete Button and Label types from there, despite program building succesfully.

Is there a way to fix this?

Seems like it is a bug, because i installed intellij idea and autocompletion works fine here

Note that as far as I know, intellij and vs-code use different backends for autocompletion.

It would also be useful to know which VS Code extension you're using - there's three that I know of:

  • Rust by kalitaalexey: The first extension that was released (or at least a fork of it), so it has the most downloads. However, it's unofficial, and extremely outdated at this point (last commit was in 2017).
  • Rust (rls) by rust-lang: This is the 'official' plugin, which uses the language server that you can get from rustup. Stable, but potentially going to be replaced by the third extension on this list in the future.
  • rust-analyzer by matklad: This is an experimental extension/language server for Rust, which I believe may replace RLS eventually. Earlier in development than the other two, but in my experience it works a lot better.

I personally would 100% recommend using rust-analyzer, if you're not already.

1 Like

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