Is it possible to obtain the source file and start line for a function/macro definition programmatically? I know that __info__/1 can provide the source file for a module, but I would like to be able to get the same information for function and macro definitions. I want to implement 'goto definition' for the Atom iex package.
I can get the source file for a module from __info__ and then use regex to try to locate the line in the file with the definition, but this is clunky. I was hoping there was some means of acquiring the file and line info directly.
Thank,
James