I can't get the hover infomation with using rust_analyzer api. #15593
Answered by Veykril
baiguoname asked this question in Q&A
-
| I have the following codeblock: I try to hover the information of |
Beta Was this translation helpful? Give feedback.
Answered by Veykril Sep 10, 2023
Replies: 2 comments
-
| You want to call |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by baiguoname
-
| Thanks you so so so much! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.