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

Suggestion: Use racer for hover until RLS analysis completes

Open TedDriggs opened this issue 7 years ago • 7 comments

Version of VSCode: 1.12.2 Version of the extension: 0.3.14 OS: macOS

Description:

On a few small projects, I've noticed RLS takes a while to complete analysis, and I don't see hover tips until the analysis is complete. Switching to legacy mode gets results much faster which are still generally accurate.

Proposal: Until RLS has finished analysis, redirect hover events to the legacy mode code.

TedDriggs avatar Jun 06 '17 23:06 TedDriggs

I'm actually seeing very frequent hover failures from RLS, without any error message in the logs. So there may be more to this than slow analysis times.

TedDriggs avatar Jun 06 '17 23:06 TedDriggs

@nrc @jonathanturner, I believe RLS uses Racer, doesn't it? Doesn't it work like @TedDriggs wants?

KalitaAlexey avatar Jun 20 '17 16:06 KalitaAlexey

I'm digging further into the code now; something seems to be up but I am having trouble figuring out exactly what.

TedDriggs avatar Jun 20 '17 19:06 TedDriggs

Inside the RLS we use Racer as fallback for 'goto def', but not for type on hover (and always use it for completion)

nrc avatar Jun 20 '17 20:06 nrc

@nrc, How hard is it to use racer for hovering until the analysis has completed?

KalitaAlexey avatar Jun 20 '17 20:06 KalitaAlexey

not hard, I've not considered it too high priority. I also worry a bit more than jump to def because for hovers the info is a bit different from the compiler vs Racer and so the user would see different results, whereas jump to def is always the same

nrc avatar Jun 20 '17 20:06 nrc

@TedDriggs, Having not accurate results may lead to confusion. I believe it's better to wait until RLS analysis become faster.

@nrc, Analysis can be faster, right?

KalitaAlexey avatar Jun 20 '17 20:06 KalitaAlexey