Allow viewing the crate graph in a webview

This commit is contained in:
Jonas Schievink 2021-05-11 16:15:31 +02:00
parent 9fa9d166d8
commit a85a2c4d15
11 changed files with 125 additions and 0 deletions

View file

@ -49,6 +49,7 @@ mod syntax_tree;
mod typing;
mod markdown_remove;
mod doc_links;
mod view_crate_graph;
use std::sync::Arc;
@ -287,6 +288,10 @@ impl Analysis {
self.with_db(|db| view_hir::view_hir(&db, position))
}
pub fn view_crate_graph(&self) -> Cancelable<Result<String, String>> {
self.with_db(|db| view_crate_graph::view_crate_graph(&db))
}
pub fn expand_macro(&self, position: FilePosition) -> Cancelable<Option<ExpandedMacro>> {
self.with_db(|db| expand_macro::expand_macro(db, position))
}