There are multiple VSCode extensions for Erlang. The one I have installed is named Erlang/OTP (by Yuce Tekol) with 29k installs. There are two more extensions, one named erlang by Pierrick Gourlain with 105k installs and one named Erlang LS with 11k installs.
I don’t remember why I chose the one named Erlang/OTP among the three.
Used to use the Pierrick Gourlain one, moved to Erlang LS for its integration with the compiler, Dialyzer etc. It’s not been all smooth sailing - at one point I managed to get a formatter to destructively corrupt files on save - but all in all I consider Erlang LS to be the future.
I’m just using syntax highlight now. I was using the LS but I got annoyed with it constantly popping open a window displaying logs for no clear reason.
Hi @phild the formatting issue you discovered is probably due to the default formatter of rebar3_format itself, which Erlang LS uses as an optional formatter. See the root cause at: https://github.com/AdRoll/rebar3_format/issues/216
We are planning to add support for additional formatters, including erlfmt directly (since it comes with Erlang LS already).
Hi @DevotionGeo ! Given I’m one of the core maintainers of Erlang LS I may have a biased view on this
Pierrick Gourlain’s extension has been around for a very long time and it’s VSCode specific, while the Erlang LS project was started a couple of years ago. In my view, the big advantage of Erlang LS is that its core is also used outside of VS Code (many Emacs / Vim users), so it can rely on a wider community (46 contributors vs 20). Erlang LS offers a set of unique features (e.g. detection of unused includes and macros, warnings about bounded variables, etc). Most of these features are documented at: Features - Erlang LS
Feel free to give it a try, happy to help if you need support.
PS: I’m also interested in hearing the reason why other users favour other extensions. I would love to listen what Erlang LS is lacking/doing wrong.
As best I recall I had VSCode config relating to a different formatter than what I’d put in my rebar.config. It is my assumption that two formatters coexist a bit like two spouses
if it can work with docker
I try, but I cant make it
--------------edit-------------
it work well on defacto image(but alpine not work)
cant debugger with attach but default launch config work