mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
Allow viewing the crate graph in a webview
This commit is contained in:
parent
9fa9d166d8
commit
a85a2c4d15
11 changed files with 125 additions and 0 deletions
|
@ -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))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue