elixir-lsp / elixir-ls

A frontend-independent IDE "smartness" server for Elixir. Implements the "Language Server Protocol" standard and provides debugger support via the "Debug Adapter Protocol"
https://elixir-lsp.github.io/elixir-ls/
Apache License 2.0
1.46k stars 194 forks source link

Fails on WSL, Error - "Protocols are not consolidated" #972

Closed yxshv closed 1 year ago

yxshv commented 1 year ago

Environment

Current behavior

So, I was trying to get elixirls setup with nvim-lspconfig, but it wasn't working. I cloned the repo locally and changed the cmd in the settings

nvim_lsp.elixirls.setup {
 cmd = { "/home/yxsh/.elixir-ls/release/language_server.sh" },
}

but it still didn't work so i decided to run /home/yxsh/.elixir-ls/release/language_server.sh in the terminal and this was the output

running /home/yxsh/.elixir-ls/release/launch.sh
Preffered shell is bash, relaunching
Looking for ASDF install
ASDF install found in /home/linuxbrew/.linuxbrew/opt/asdf/libexec/asdf.sh, sourcing
Content-Length: 103

{"jsonrpc":"2.0","method":"window/logMessage","params":{"message":"Started ElixirLS v0.16.0","type":3}}Content-Length: 113

{"jsonrpc":"2.0","method":"window/logMessage","params":{"message":"Running in /home/yxsh/elixirschool","type":3}}Content-Length: 130

{"jsonrpc":"2.0","method":"window/logMessage","params":{"message":"ElixirLS built with elixir \"1.14.0\" on OTP \"25\"","type":3}}Content-Length: 151

{"jsonrpc":"2.0","method":"window/logMessage","params":{"message":"Running on elixir \"1.15.4 (compiled with Erlang/OTP 24)\" on OTP \"25\"","type":3}}Content-Length: 109

{"jsonrpc":"2.0","method":"window/logMessage","params":{"message":"Protocols are not consolidated","type":3}}
Unable to read from device: :invalid_content_length

Expected behavior

I should've gotten code completion and errors in neovim

lukaszsamson commented 1 year ago

so i decided to run /home/yxsh/.elixir-ls/release/language_server.sh in the terminal and this was the output...

This is the expected output - it's working and returns an error if you issue an invalid LSP command

Please post output from your editor

yxshv commented 1 year ago

oh i see,

I left the editor open for a while, and then i came back and, LSP was working.

its just takes some time to start 😅

sorry about this