From 8ccd26adf396b49c7ba9e3abe0a92869b1a4c728 Mon Sep 17 00:00:00 2001 From: "Jeremy A. Kolb" Date: Mon, 5 Nov 2018 16:37:27 -0500 Subject: Show documentation for hover requests --- crates/ra_analysis/src/imp.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'crates/ra_analysis/src/imp.rs') diff --git a/crates/ra_analysis/src/imp.rs b/crates/ra_analysis/src/imp.rs index 819827b95..166f1484f 100644 --- a/crates/ra_analysis/src/imp.rs +++ b/crates/ra_analysis/src/imp.rs @@ -364,6 +364,16 @@ impl AnalysisImpl { ret } + pub fn doc_comment_for( + &self, + file_id: FileId, + symbol: FileSymbol, + ) -> Cancelable> { + let file = self.db.file_syntax(file_id); + + Ok(symbol.docs(&file)) + } + pub fn diagnostics(&self, file_id: FileId) -> Cancelable> { let module_tree = self.module_tree(file_id)?; let syntax = self.db.file_syntax(file_id); -- cgit v1.2.3