rust-lang / rls

Repository for the Rust Language Server (aka RLS)
Other
3.51k stars 257 forks source link

Code completion errors for non trivial types #1590

Open TomzBench opened 4 years ago

TomzBench commented 4 years ago

I am curious if my setup is broken, or perhaps code completion is currently not able to resolve certain types. If have a simple type wrapped in Arc<Mutex< T >> for example, I cannot receive completions for the T. I have a simple repo producing the issue here: https://github.com/TomzBench/ycm-rust-example ...And I confirmed other people see the same behaviour.

Here is a screen shot depicting wrong completion set for a type struct Thing {n:u32} ycm-rust-rls-issue

bennetthardwick commented 4 years ago

This is currently on the racer roadmap as https://github.com/racer-rust/racer/issues/829. It's happening because it doesn't know how to handle std::ops::Deref.

There's another issue for all the irrelevant completions (https://github.com/racer-rust/racer/issues/165) - specifically private members - but it's quite quiet.

TomzBench commented 4 years ago

Oh I see. Thank you for the references.