mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 21:35:20 +00:00
Show documentation for hover requests
This commit is contained in:
parent
6df71da81f
commit
8ccd26adf3
6 changed files with 71 additions and 4 deletions
|
@ -364,6 +364,16 @@ impl AnalysisImpl {
|
|||
ret
|
||||
}
|
||||
|
||||
pub fn doc_comment_for(
|
||||
&self,
|
||||
file_id: FileId,
|
||||
symbol: FileSymbol,
|
||||
) -> Cancelable<Option<String>> {
|
||||
let file = self.db.file_syntax(file_id);
|
||||
|
||||
Ok(symbol.docs(&file))
|
||||
}
|
||||
|
||||
pub fn diagnostics(&self, file_id: FileId) -> Cancelable<Vec<Diagnostic>> {
|
||||
let module_tree = self.module_tree(file_id)?;
|
||||
let syntax = self.db.file_syntax(file_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue