Discussion

Ask HN: Elixir LSP doesn't work on VSCode and Neovim. Any solutions?

I have tried installing Elixir+Erlang through Homebrew (as instructed by the official Elixir website): https://elixir-lang.org/install.html#macos

I also tried uninstalling them and installing through ASDF and I made sure that they both had the same version (27) as mentioned in this article: https://elixir-ko.github.io/install.html

This Issue mentions that Elixir may be incompatible with the most recent OpenSSL versions, but I don't want to downgrade OpenSSL: https://github.com/erlang/otp/issues/4577#issuecomment-925962048. Also: https://elixirforum.com/t/elixirls-cannot-connect-to-server-in-vscode/55345/8

I also did every tip mentioned on the Github page of the Elixir LSP: https://github.com/elixir-lsp/elixir-ls?tab=readme-ov-file#troubleshooting

Several hours later, I still can't use the Elixir LSP in VSCode. This is the error I keep getting:

``` Client ElixirLS - elx: connection to server is erroring. Header must provide a Content-Length property. {"{\"jsonrpc\"":"\"2.0\",\"method\":\"window/logMessage\",\"params\":{\"message\":\"Running in /Users/<me>/Downloads/LLM/elx\",\"type\":3}}Content-Length: 130"} Shutting down server. ```

And

``` Client ElixirLS - elx: connection to server is erroring. Header must provide a Content-Length property. {"{\"jsonrpc\"":"\"2.0\",\"method\":\"window/logMessage\",\"params\":{\"message\":\"Started ElixirLS v0.21.3\",\"type\":3}}Content-Length: 121"} Shutting down server. ```

And

``` Client ElixirLS - elx: connection to server is erroring. Header must provide a Content-Length property. {"\u001b[6 qcontent-length":"103"} Shutting down server. ```

This isn't supposed to be like this, and a search on Google shows many people have this problem. I like Elixir and BEAM, but the tooling is not comparable to Rust, Haskell, Go, etc.

Even with Python (which has one of the worst toolings), all I need to do before using the language is:

1. Install Python through Homebrew or a binary.

2. Install the plugin on VSCode.

3. Profit.

1 points behnamoh 2 years ago 3 comments

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton