DEV Community

Cover image for Elixir intellisense stop working
Long Le for OnPoint Vietnam

Posted on • Updated on

Elixir intellisense stop working

Recently, VSCode intellisense feature for elixir has stopped working on my Mac. Code autocomplete, go to definition, function description... are all failed. My colleagues encounter the same problem.
After researching, I found the root cause is ElixirLS has crashed from launching.
ElixirLS crash
I tried to disable ElixirLS, close the editor, open the editor again and enable ElixirLS but no luck. I also tried to reinstall ElixirLS but nothing changes.
So I went to ElixirLS Github homepage, move to Troubleshooting region and I found the solution:

  1. Remove .elixir_ls folder in project folder:

    rm -rf .elixir_ls/ 
  2. Close VSCode.

  3. Open project in VSCode again, wait for ElixirLS run.


  4. And voila!

Updated 2021-11-14:

If the above method does not work, you can try the final solution below:

  1. Get your elixir path

    which elixir
  2. Edit the file of elixir-ls extension (the file path can be seen in the log above), add the export PATH="elixir/path/here" before exec elixir command.
    Image description

This way has an inconvenience that is every time you update the extension, you need to modify the file again.

Top comments (1)

minhtuhoang19 profile image
minhtu-hoang19 • Edited

Updated 2023:

ElixirLS supports integration with ASDF.

export ASDF_DIR=#folder path containing your script
Enter fullscreen mode Exit fullscreen mode