This uses the fold feature of syn which uses the visitor pattern to transform parts of module AST. This way we traversing the AST for hook attributes and reusing the existing nodes.
This approach seems to fix #6, so now rust-analyzer can properly add imports!
This uses the
fold
feature ofsyn
which uses the visitor pattern to transform parts of module AST. This way we traversing the AST for hook attributes and reusing the existing nodes.This approach seems to fix #6, so now rust-analyzer can properly add imports!