mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Initial implementation of view-hir command
This commit is contained in:
parent
1d530756ed
commit
077592a12f
10 changed files with 145 additions and 1 deletions
|
@ -31,6 +31,7 @@ mod folding_ranges;
|
|||
mod goto_definition;
|
||||
mod goto_implementation;
|
||||
mod goto_type_definition;
|
||||
mod view_hir;
|
||||
mod hover;
|
||||
mod inlay_hints;
|
||||
mod join_lines;
|
||||
|
@ -271,6 +272,10 @@ impl Analysis {
|
|||
self.with_db(|db| syntax_tree::syntax_tree(&db, file_id, text_range))
|
||||
}
|
||||
|
||||
pub fn view_hir(&self, position: FilePosition) -> Cancelable<String> {
|
||||
self.with_db(|db| view_hir::view_hir(&db, position))
|
||||
}
|
||||
|
||||
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