Skip to content

I can't get the hover infomation with using rust_analyzer api. #15593

Answered by Veykril
baiguoname asked this question in Q&A
Discussion options

You must be logged in to vote

You want to call api.hover(source_file_id, TextRange(0, 0)) (or 1,1 or 2,2). If you pass a non-empty range r-a will do a so called ranged hover which fetches the nearest expression and returns a type hover for that expression instead.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by baiguoname
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants