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

Question: Why don't some crates show all possible auto-completions?

Open redactedscribe opened this issue 8 years ago • 6 comments
trafficstars

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 avatar Feb 21 '17 01:02 redactedscribe

@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.

KalitaAlexey avatar Feb 21 '17 04:02 KalitaAlexey

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.

redactedscribe avatar Feb 21 '17 21:02 redactedscribe

RLS haven't yet implemented compiler based completion, and uses Racer as a completion backend currently.

sinkuu avatar Feb 21 '17 23:02 sinkuu

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.

redactedscribe avatar Feb 23 '17 10:02 redactedscribe

Of course it would be easy. At some point it would be enough to do cargo install rls.

KalitaAlexey avatar Feb 23 '17 11:02 KalitaAlexey

Okay, thanks.

redactedscribe avatar Feb 23 '17 22:02 redactedscribe