I would like for the auto-import code action to insert the use statement inside the function where it was invoked, and if there is no function, to put it at the module level.
I prefer having my imports inside functions when possible because it makes it easier to move the function, and to see what this specific function depends on. It's common for me to be in situations where a single function makes plenty of imports that other parts of the same module won't reference, cluttering the import section at the top of the module.
I'd be willing to implement this myself, but I don't know how the development process works here and sadly I don't have the time to look into it. However, if someone points me towards some direction I might be able to pick it up.
I would like for the auto-import code action to insert the
use
statement inside the function where it was invoked, and if there is no function, to put it at the module level.I prefer having my imports inside functions when possible because it makes it easier to move the function, and to see what this specific function depends on. It's common for me to be in situations where a single function makes plenty of imports that other parts of the same module won't reference, cluttering the import section at the top of the module.
I'd be willing to implement this myself, but I don't know how the development process works here and sadly I don't have the time to look into it. However, if someone points me towards some direction I might be able to pick it up.