WhatsApp / erlang-language-platform

Erlang Language Platform. LSP server and CLI.
https://whatsapp.github.io/erlang-language-platform/
Apache License 2.0
209 stars 16 forks source link

Using ELP without eqWAlizer #14

Closed xxdavid closed 5 months ago

xxdavid commented 5 months ago

Hi!

Thank you so much for making ELP! I watched the talk about ELP at the last CodeBEAM with great interest. It sounds like this is going to be a great tool.

My question is: is it possible to use the ELP (especially the language server via the VS Code extension) without eqWAlizer. I believe eqWAlizer is a great tool, but I am not currently interested in using it (as I use Gradualizer, and some aspects differ between the two tools). I also understand that you always use the combo ELP + eqWAlizer internally in WhatsApp, but I think many people out there do not. I personally would appreciate all the code analyses that ELP alone brings (hovers, jump to definition, diagnostics, autocomplete etc.) but I don't want to see diagnostics/problems coming from eqWAlizer. Is there any way how I can configure my project or the VS Code extension to make ELP work like that?

alanz commented 5 months ago

You can disable it by puttin a file called .elp.toml in the root of your project, with the following into it

[eqwalizer]
enable_all = false
robertoaloi commented 5 months ago

I gave this a quick try and it looks like we currently don't have a way to combine a .elp.toml file with rebar3 projects. The moment you create the TOML file, project discovery tries to use Buck2 to load project definition. We need to decouple the ability of running eqwalizer from the project discovery.

xxdavid commented 5 months ago

Thank you for your responses! I can confirm that using the provided .elp.toml disables eqWAlizer but also the rebar3 integration. Decoupling these two things would be great.

alanz commented 5 months ago

We are working on this at the moment, should have something in a day or so.

alanz commented 5 months ago

Please try this again with https://github.com/WhatsApp/erlang-language-platform/releases/tag/2024-01-29

We now separate out the config portion of .elp.toml and the project discovery part

xxdavid commented 5 months ago

Now it works as expected. Thank you! 🙁