I can't get the hover infomation with using rust_analyzer api. #15593
-
| I have the following codeblock: I try to hover the information of  | 
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
| You want to call  | 
Beta Was this translation helpful? Give feedback.
-
| Thanks you so so so much! | 
Beta Was this translation helpful? Give feedback.
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.