vscode-rust
vscode-rust copied to clipboard
Question: Why don't some crates show all possible auto-completions?
Version of VSCode: 1.3.8
Some libraries don't show all the possible auto-completions. When trying the same crate in IntelliJ IDEA, all completions are shown. For example:
Cargo.toml:
[dependencies.sfml]
path = "../../../rust-sfml"
version = "0.11"
main.rs:
extern crate sfml;
use sfml::graphics:: // Only 2 suggestions.
…only 2 suggestions are displayed for the graphics submodule, when IntelliJ IDEA displays all 60 or so. Below are the two suggestions that are displayed.
rust-sfml/src/graphics/mod.rs:
...
pub use graphics::vertex::Vertex;
pub use csfml_graphics_sys::sfGlyph as Glyph; // Suggested.
pub use graphics::render_texture::RenderTexture;
...
...
mod text;
pub mod text_style; // Suggested.
mod shader;
...
Is this something that can be improved through the extension?
Thanks.
@redactedscribe, Legacy Mode or RLS Mode? If it is Legacy Mode and the crate has macroses, racer is bad at it. If it is RLS Mode it needs to be examined.
I will look into it. I still must determine if I have installed RLS correctly to rule out any issue there. I know for a fact that Legacy Mode did not show all the auto-completions. I think there was no difference when using RLS Mode, but again I'm not sure if my RLS installation is correct.
RLS haven't yet implemented compiler based completion, and uses Racer as a completion backend currently.
I see. Hopefully this will be solved through the compiler-completion.
@sinkuu Do you know if RLS is eventually going to be much simpler to install so even newbies can leverage its features? The information on how to build it I found to be rather arcane.
Of course it would be easy.
At some point it would be enough to do cargo install rls.
Okay, thanks.