I have a LinuxMint machine with Elixir 1.6.6 installed, Erlang 20.3 using Kerl, Exenv. And whenever I tried to activate Elixir LS plugin on VSCode, the IDE, my system everything freezes. Not sure why. Earlier I tried with Asdf too which didn’t work. Wondered if it could be some package manager issue so now got from Kerl, exenv. But not sure about what could be the issue to freeze again.
Kindly share any tips or tricks to make ElixirLS working in my VSCode or test if it’s compatible with existing elixir installation either through terminal or any other way possible methods.
Popup error on VSCode
Failed to run "elixir" command elixirls will probably fail to launch.
Depending on your systems specs this is as expected (sadly), as elixirls will built dialyzer PLT files.
Depending on the number of dependencies of a project I open in VScode with ELS it can take up to 5 minutes until my system gets usable again. It has an i5 (4th gen with 2.6 GHz) and 8 GiB of RAM (of which usually about 10 are taken by Google Chrome ;))
But the deps PLT has to got build on every change of deps, updating, adding, removing… This might become tedious often, as well when you come to a bigger project and want to contribute.
I wish the LS would use the same PLTs that dialyxir is maintaining, then I could trigger PLT building easily on demand. Also a way to restart the LS without restarting the editor were nice…
If disabling dialyzer helps to improve the responsiveness of your system, then of course it helps to debug the other stuff, as you are actually able to debug then.
I just published a small update that should make launch failures a bit easier to diagnose. If the pre-launch test that checks that Elixir is installed fails, it’ll print out the process’s PATH to the development console so you can figure out what’s wrong more easily.
However, the freezing issue does sound more like the server is launching (despite the warning) and Dialyzer is bringing your system to a crawl. You should see a pop-up message like “Building core Elixir PLT” if this is the case. Try adding "elixirLS.dialyzerEnabled": false to your settings.json to disable it.
The initial dialyzer often brings my system down for a couple of minutes, and this happens thus badly, that the pop up appears only after dialyzer has finished and disappears after fractions of seconds. Both happens without any animations. VScode remains laggy for another 30 seconds before it normalizes again.
A way to manually trigger building of PLTs were nice… Maybe even push a warning to the issues tab until they are built?