mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Show item info when hovering intra doc links
This commit is contained in:
parent
065a8e87cd
commit
8b0d0bd9c7
6 changed files with 175 additions and 128 deletions
|
@ -190,10 +190,10 @@ pub(super) fn doc_comment(
|
|||
intra_doc_links.extend(
|
||||
extract_definitions_from_markdown(line)
|
||||
.into_iter()
|
||||
.filter_map(|(link, ns, range)| {
|
||||
validate_intra_doc_link(sema.db, &def, &link, ns).zip(Some(range))
|
||||
.filter_map(|(range, link, ns)| {
|
||||
Some(range).zip(validate_intra_doc_link(sema.db, &def, &link, ns))
|
||||
})
|
||||
.map(|(def, Range { start, end })| {
|
||||
.map(|(Range { start, end }, def)| {
|
||||
(
|
||||
def,
|
||||
TextRange::at(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue