mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Resolve macros in snippet require items
This commit is contained in:
parent
ca1fdd75f1
commit
2b17da60db
3 changed files with 49 additions and 54 deletions
|
@ -105,8 +105,8 @@ fn add_custom_completions(
|
|||
ImportScope::find_insert_use_container_with_macros(&ctx.token.parent()?, &ctx.sema)?;
|
||||
ctx.config.snippets.iter().filter(|snip| snip.scope == scope).for_each(|snip| {
|
||||
let imports = match snip.imports(ctx, &import_scope) {
|
||||
Ok(imports) => imports,
|
||||
Err(_) => return,
|
||||
Some(imports) => imports,
|
||||
None => return,
|
||||
};
|
||||
let mut builder = snippet(ctx, cap, &snip.label, &snip.snippet);
|
||||
for import in imports.into_iter() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue