Hello!
First thing which lead to problems is using ~
in the path — bare-bones sh
frequently doesn’t expand it.
After fixing this problem I still get language server dying even when I try to communicate to it manually:
$ sh ~/Hub/elixir-ls/target/release/language_server.sh
Content-Length: 160
{"jsonrpc":"2.0","method":"window/logMessage","params":{"message":"\u001B[22m\n20:01:13.952 [info] Application hipe exited: :stopped\n\u001B[0m","type":4}}
Content-Length: 99
{"jsonrpc":"2.0","method":"window/logMessage","params":{"message":"Started ElixirLS","type":4}}
Content-Length: 325
{"jsonrpc":"2.0","method":"window/logMessage","params":{"message":"\u001B[22m\n20:01:13.953 [info] Application elixir_sense exited: :stopped\n\u001B[0m\u001B[22m\n20:01:13.953 [info] Application erl2ex exited: :stopped\n\u001B[0m\u001B[22m\n20:01:13.953 [info] Application forms exited: :stopped\n\u001B[0m","type":4}}
Content-Length: 138
{"jsonrpc":"2.0","method":"window/logMessage","params":{"message":"Elixir version: \"1.8.1 (compiled with Erlang/OTP 21)\"","type":4}}
Content-Length: 105
{"jsonrpc":"2.0","method":"window/logMessage","params":{"message":"Erlang version: \"21\"","type":4}}
Content-Length: 415
{"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{"textDocument":{"colorProvider":null,"completion":{"completionItem":{"documentationFormat":["plaintext"],"snippetSupport":false}}},"workspace":{"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","delete","rename"]}}},"processId":17120,"rootUri":"file:///Users/rprakapchuk/Hub/elixir-ls/apps/language_server","trace":"off"},"id":0}
Content-Length: 1258
{"jsonrpc":"2.0","method":"window/logMessage","params":{"message":"** (exit) exited in: GenServer.call(ElixirLS.LanguageServer.JsonRpc, {:packet, %{\"id\" => 0, \"jsonrpc\" => \"2.0\", \"method\" => \"initialize\", \"params\" => %{\"capabilities\" => %{\"textDocument\" => %{\"colorProvider\" => nil, \"completion\" => %{\"completionItem\" => %{\"documentationFormat\" => [\"plaintext\"], \"snippetSupport\" => false}}}, \"workspace\" => %{\"workspaceEdit\" => %{\"documentChanges\" => true, \"resourceOperations\" => [\"create\", \"delete\", \"rename\"]}}}, \"processId\" => 17120, \"rootUri\" => \"file:///Users/rprakapchuk/Hub/elixir-ls/apps/language_server\", \"trace\" => \"off\"}}}, 5000)\n ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started\n (elixir) lib/gen_server.ex:979: GenServer.call/3\n (elixir) lib/stream.ex:435: anonymous fn/4 in Stream.each/2\n (elixir) lib/stream.ex:1394: Stream.do_resource/5\n (elixir) lib/stream.ex:1568: Enumerable.Stream.do_each/4\n (elixir) lib/stream.ex:640: Stream.run/1\n (stdlib) erl_eval.erl:680: :erl_eval.do_apply/6\n (elixir) lib/code.ex:232: Code.eval_string/3","type":2}}
I will try to figure out what happens, but I’m not an expert in Erlang/Elixir.