Closed crbelaus closed 9 months ago
Just to clarify the procedure, you need to switch the settings to tcp, quit vscode, start the server, then re-open vscode
What version of next-ls?
Just to clarify the procedure, you need to switch the settings to tcp, quit vscode, start the server, then re-open vscode
Yeah, this is the process I am following.
How can I check the next-ls version? I've cleaned everything up and downloaded the extension again so I think it fetched the latest next-ls version.
path/to/nextls --version
Hmm it seems to not like it:
➜ ~ ~/.cache/elixir-tools/nextls/bin/nextls --version
07:55:35.436 [notice] Application next_ls exited: NextLS.Application.start(:normal, []) returned an error: shutdown: failed to start child: NextLS.LSPSupervisor
** (EXIT) an exception was raised:
** (NextLS.LSPSupervisor.OptionsError) Unknown Options: --version
Valid options:
--stdio Starts the server using stdio
--port port-number Starts the server using TCP on the given port
(next_ls 0.9.1) lib/next_ls/lsp_supervisor.ex:51: NextLS.LSPSupervisor.init/1
(stdlib 5.0.2) supervisor.erl:330: :supervisor.init/1
(stdlib 5.0.2) gen_server.erl:962: :gen_server.init_it/2
(stdlib 5.0.2) gen_server.erl:917: :gen_server.init_it/6
(stdlib 5.0.2) proc_lib.erl:241: :proc_lib.init_p_do_apply/3
Kernel pid terminated (application_controller) ({application_start_failure,next_ls,{{shutdown,{failed_to_start_child,'Elixir.NextLS.LSPSupervisor',{#{message => <<"Unknown Options: --version \n\nValid options:\n\n--stdio Starts the server using stdio\n--port port-number Starts the server using TCP on the given port\n">>,'__struct__' => 'Elixir.NextLS.LSPSupervisor.OptionsError','__exception__' => true},[{'Elixir.NextLS.LSPSupervisor',init,1,[{file,"lib/next_ls/lsp_supervisor.ex"},{line,51}]},{supervisor,init,1,[{file,"supervisor.erl"},{line,330}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,962}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,917}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,241}]}]}}},{'Elixir.NextLS.Application',start,[normal,[]]}}})
Crash dump is being written to: erl_crash.dump...done
Then that means your version is wildly out of date
Oh wow. That was right. I don't know how I managed to have such an old version...
Thanks for the help @mhanberg, it is working now. I just removed the ~/.cache/elixir-tools/nextls/bin/nextls
file, closed VSCode and reopened it again. It prompted me for permissions to download NextLS and got the latest version as expected.
Excellent, sorry about that!
I am having trouble getting NextLS to start from VSCode. I always get the following message in the "Extension host" output tab.
I can run the
nextls
executable manually and start it on port 9000 as explained in the README:Then, I can switch the VSCode configuration to use the TCP adapter and port 9000 but it still seems not to do anything. I can't see the
.elixir_tools
directory and the language server functionality does not work.