ElixirLS in vscode: Failed to run 'elixir'

My problem

Env

OS: Window

# installed by asdf
elixir 1.15.2-otp-26
erlang 26.2.0

ElixirLS
0.20.0 (LTS)

When I run vscode and open the elixir file, a pop-up message like the below

Failed to run 'elixir' command. ElixirLS will probably fail to launch. Logged PATH to Development Console.

So, I checked view - output - elixirLS

[Error - 6:46:56 PM] Server process exited with code 1.
C:\Users\doo\.asdf\shims\erl.exe�� ������ ���� ���� Windows ������ ȣȯ���� �ʽ��ϴ�. ��ǻ���� �ý��� ������ Ȯ���ϰ� ����Ʈ���� �Խ��ڿ��� �����Ͻʽÿ�.
[Error - 6:46:56 PM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 6:46:56 PM] The ElixirLS - server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
[Error - 6:46:56 PM] ElixirLS - client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 6:46:56 PM] Restarting server failed
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 6:46:56 PM] Server process exited with code 1.

Nothing works except for the highlighting syntax

I tried to add PATH

echo $PATH

/c/Program Files/Elixir/bin:
/c/Program Files/Erlang OTP/bin:
/c/Users/doo/.asdf/shims:
/c/Users/doo/.asdf/bin

I’m using git bash in vscode *opened by git bash

Expected

intelliSense
Go to definition (custom function, built-in function

Please help me

Can you run elixir? I didn’t think asdf worked on Windows.

1 Like

Yes, It works well, but vscode can’t find elixir command

Can you only run it from git bash or does it work from cmd, pwsh, etc?

and i can run terminal(git bash) in vscode (ctrl + `)

I resolved

on Window
There is no .bat or .exe in .asdf/bin path

# .bashrc
export PATH=$PATH:$PATH:$HOME/.asdf/shims
export PATH=$PATH:$HOME/.asdf/bin

and I modified path
PATH=new_path:$PATH new path priority^
PATH=$PATH:new_path priority v

solution:

# .bashrc
export PATH=$HOME/.asdf/installs/elixir/1.15.2-otp-26/bin:$PATH
export PATH=$HOME/.asdf/installs/erlang/26.2.0/bin:$PATH