mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Add Semantics::original_ast_node for upmapping nodes out of macro files
This commit is contained in:
parent
b9fa37f5b4
commit
96db0d8bdd
14 changed files with 182 additions and 48 deletions
|
@ -102,8 +102,7 @@ fn add_custom_completions(
|
|||
cap: SnippetCap,
|
||||
scope: SnippetScope,
|
||||
) -> Option<()> {
|
||||
let import_scope =
|
||||
ImportScope::find_insert_use_container_with_macros(&ctx.token.parent()?, &ctx.sema)?;
|
||||
let import_scope = ImportScope::find_insert_use_container(&ctx.token.parent()?, &ctx.sema)?;
|
||||
ctx.config.prefix_snippets().filter(|(_, snip)| snip.scope == scope).for_each(
|
||||
|(trigger, snip)| {
|
||||
let imports = match snip.imports(ctx, &import_scope) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue