<div dir="ltr">Hi Roberto,<div><br></div><div>Thanks for taking the time to look into this. Sorry about the lag - I'm on a business trip and have been rather busy.</div><div><br></div><div>I have tried using your config settings, but I still get the "Unable to open…" error message and there is no Erlang LS in sight when I try to enable it.</div><div><br></div><div>At this point I'm suspecting that this is a problem between Sublime and LSP, so I'll try to get some help on that.</div><div>I will report back with my findings.</div><div><br></div><div>Cheers,</div><div>Torben</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 18 Jan 2020 at 20:52, Roberto Aloi <<a href="mailto:prof3ta@gmail.com">prof3ta@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Hi Torben!<br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">I'm using this language server for Erlang: <a href="https://github.com/erlang-ls/erlang_ls" target="_blank">github.com/erlang-ls/erlang_ls</a></blockquote><div> </div>Nice that you are taking Erlang LS for a spin. We haven't tried the server with Sublime text yet, so I gave Sublime I try just now (I think I have all possible editors on my laptop now). Disclaimer: I am not a Sublime user, so take my response with a grain of salt.<br><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div>Looking in the console for ST3 I find a complaint about Rebar (the ancient one, so I'm ignoring that for now) and a problem wrt reading a config file:</div><div>Unable to open /Users/torben.hoffmann/Library/Application Support/Sublime Text 3/Packages/LSP/LSP.sublime-settings</div><div>Which is a bit confusing because that file is at Packages/User/LSP.sublime-settings.</div></div></div></div></div></blockquote><div><br>I wouldn't worry about that. It seems the LSP Package for Sublime uses a default settings file (the one in [...]/LSP/LSP.sublime-settings)<br>and one for the user overrides (the one in [...]/User/LSP.sublime-settings).<br><br>So, what I did to get the connection to the Erlang LS working:<br><br>Preferences -> Package Settings -> LSP -> Settings<br><br>Added:<br><br>{<br> "clients":<br> {<br> "erlang-ls":<br> {<br> "command":<br> [<br> "/path/to/my/erlang_ls", "--transport", "stdio"<br> ],<br> "enabled": true,<br> "languageId": "erlang",<br> "scopes":<br> [<br> "source.erlang"<br> ],<br> "syntaxes":<br> [<br> "Packages/Erlang/Erlang.sublime-syntax"<br> ]<br> }<br> }<br>}<br><br>Even if I have `erlang_ls` in my $PATH, I had to use an absolute path. I guess there's some way to pass the correct $PATH to Sublime, but I haven't tried that. Some Sublime user may help with that.<br>That's all it was required to get things working. One thing I noticed is that, if you open a single .erl file, Sublime will complain about an error during the error initialization.<br>Instead, you should open the "project" first (i.e. the directory containing your Erlang file), then the file. This seems due to a bug in Erlang LS which always expects a non-null "root path" to be passed during initialization and in Sublime that happens only if you open a directory first. Indeed the LSP protocol specifies that the "root path" can be null, so we will fix that. Fro the time being, please use the workaround.<br><br>I will add the above to the Erlang LS README. We should also try to get Erlang LS included in the Sublime LSP Package to ease installation. Contributions are always welcome :)<br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">But given the nature of the error messages I don't think that is the issue, at least not yet ;-)</blockquote>Now that you are in Erlang LS land, feel free to use the #language-server channel in the Erlanger Slack or our github issue tracker at <a href="http://github.com/erlang-ls/erlang_ls" target="_blank">github.com/erlang-ls/erlang_ls</a> to get in touch!<br><br>Best,<br><br>Roberto<br><br></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><a href="http://www.linkedin.com/in/torbenhoffmann" target="_blank">http://www.linkedin.com/in/torbenhoffmann</a><br></div>@LeHoff<br></div></div>