ElixirLS 'Find All References' and 'Go To References' Spins Indefinitely

I am using VSCode v1.100 on Mac OS with a fairly large Elixir repository. I am running Elixir 1.18.3-otp-27 installed via asdf. I have the Elixir-LS extension version 0.27.2 installed. My main issue is when I am in a .ex file and I right click on a function or a module and I select ‘Go To References’ or ‘Find All References’ VSCode will spin indefinitely. When clicking ‘Go To References’ the status spinner at the top of the file will animate indefinitely and when I click ‘Find All References’ the References view on the left toolbar will open and spin indefinitely. I tested with a much smaller repo and confirmed that this functionality was working correctly so it appears to be related to this one particular larger repo.

Step 1 when debugging Elixir LS: Delete .elixir_ls and _build, then restart the LSP (or all of VS Code).

Does it still happen after that?

1 Like

Yes it still spins indefinitely after deleting the _build and .elixir_ls folders. One thing I notice when I re-open VSCode and it creates the .elixir_ls file there is nothing inside that file other than the .gitignore. In my other repos where elixir_ls is working successfully the .elixir_ls folder contains builds for all the sub apps in the umbrella app.

UPDATE: I was able to get everything working by nuking my VSCode installation and starting from scratch. I re-installed VSCode and I didn’t log in and use the settings sync so I had zero extensions installed. I then installed the Elixir_LS extension. Closed VSCode and then re-opened VSCode from my repo directory in the terminal. Once the application loaded I investigated the output window for the Elixir_LS plugin and it was compiling my app which it had never done before. Once it was finished compiling I had full functionality.

2 Likes