mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Add recursive expand in vscode
This commit is contained in:
parent
d2782ab1c1
commit
3ccd05fedc
8 changed files with 210 additions and 5 deletions
|
@ -42,6 +42,7 @@ mod display;
|
|||
mod inlay_hints;
|
||||
mod wasm_shims;
|
||||
mod expand;
|
||||
mod expand_macro;
|
||||
|
||||
#[cfg(test)]
|
||||
mod marks;
|
||||
|
@ -296,6 +297,10 @@ impl Analysis {
|
|||
self.with_db(|db| syntax_tree::syntax_tree(&db, file_id, text_range))
|
||||
}
|
||||
|
||||
pub fn expand_macro(&self, position: FilePosition) -> Cancelable<Option<(String, String)>> {
|
||||
self.with_db(|db| expand_macro::expand_macro(db, position))
|
||||
}
|
||||
|
||||
/// Returns an edit to remove all newlines in the range, cleaning up minor
|
||||
/// stuff like trailing commas.
|
||||
pub fn join_lines(&self, frange: FileRange) -> Cancelable<SourceChange> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue