vscode-elixir icon indicating copy to clipboard operation
vscode-elixir copied to clipboard

Implement "Find all references"

Open Speedkore opened this issue 6 years ago • 3 comments

"Go to definition" works correctly, but i can't get "Find all references" to work, nothing shows, so i have to use a terminal with ag/rg/grep commands to find usages of the functions. I don't know what could be the cause or what i'm doing wrong in my installation.

What i do is open the root folder of my project with the "open folder" in the "file" menu, but i don't configure anything more. Autocomplete works, inline documentation, etc..

I realized that if i put "files.associations": {"*.ex":"python"} in settings, at least it opens the dialog with no results, but it just a hint.

Many thanks for your work!

Speedkore avatar Nov 21 '17 11:11 Speedkore

Hi, finding references is currently not supported by this plugin.

timmhirsens avatar Nov 22 '17 07:11 timmhirsens

Ok np, i have never done a plugin for vscode but i would try to help doing a pull request if it's not too complicated.

Speedkore avatar Nov 22 '17 09:11 Speedkore

I've added ReferenceProvider. It uses "mix xref callers ..." and can scan references of a module or function. mix xref even supports arity, but arity determination is sort of tricky to implement (parsing text with focus), so my initial patch doesn't support it. I believe it's good for a start anyway.

pbudzik avatar Jan 14 '18 17:01 pbudzik