From bfda0d25834250a3adbcd0d26953a1cdc6662e7f Mon Sep 17 00:00:00 2001 From: Zac Pullar-Strecker Date: Sun, 30 Aug 2020 20:02:29 +1200 Subject: WIP: Command to open docs under cursor --- crates/ide/src/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'crates/ide/src/lib.rs') diff --git a/crates/ide/src/lib.rs b/crates/ide/src/lib.rs index 57f3581b6..645369597 100644 --- a/crates/ide/src/lib.rs +++ b/crates/ide/src/lib.rs @@ -382,6 +382,14 @@ impl Analysis { self.with_db(|db| hover::hover(db, position, links_in_hover, markdown)) } + /// Return URL(s) for the documentation of the symbol under the cursor. + pub fn get_doc_url( + &self, + position: FilePosition, + ) -> Cancelable> { + self.with_db(|db| link_rewrite::get_doc_url(db, &position)) + } + /// Computes parameter information for the given call expression. pub fn call_info(&self, position: FilePosition) -> Cancelable> { self.with_db(|db| call_info::call_info(db, position)) -- cgit v1.2.3