Closed Gigitsu closed 9 months ago
I don’t see how that could be done without actually executing client code in language server. If you want to give it a try please look into elixir_sense MetadataBuilder module. This is the code that tries to expand use macro and does AST based inferience
Thank you @lukaszsamson, I'll give it a look!
I think I can close this. Thanks
Precheck
[x] Do a quick search and make sure the issue has not yet been reported [x] Do not use the issues tracker for guidance, questions or support (try Elixir Forum, Stack Overflow, Slack, etc. instead) [x] If using a client other than VS Code, please try VSCode's "ElixirLS: Elixir support and debugger" extension. Does it reproduce your failure?
Environment
Current behavior
If I define an
alias
inside a macro other than__using__
there is no autocomplete of go to definition for that alias. If I define the very same alias inside a__using__
macro, everything works as expected.I made this repository that reproduce the issue: https://github.com/Gigitsu/macro_alias_issue
Expected behavior
Aliases should be defined in a generic macro should be recognized as well as the alias defined inside a
__using__
macro