@matklad how do you recommend replacing the description portions of hover for
I think that maybe it should be just a field?
which is filled during construction of nav target from HIR?
Oh maybe I misunderstood. I was calling
classify_name_ref instead of
reference_definition. Is the intent to instead use
classify_name_ref on the
NavigationTargets returned from
No, the intention is to use classify_name_ref and to consturct Hover from it directly, bypassing NavigationTarget entirely
I think that maybe we shouldn't even have
Yeah, seems like it!
We only use descr in doc_text_for
and doc_text_for is used only by hover
so, if we re-base hover to use hir directly (via classify_name_ref), than we can completely remove descr from navigation target an implement it directly in hover
does this make sense?
For the case where the cursor is on a
NameRef it does the other cases would still use a
Hm, I think the end state here is when NavigationTarget is used only for goto definition/goto type
For example, for "index resolve case", we can make a helper function, which retruns a
Vec<FileSymbol>. These symbols will be converted to nav target by gotodef, and to hover by hover
Okay... so for the other cases in
hover that are not
NameRef I should use
SourceAnalyzer to convert to