IVR

IVR

Elixir IDEs and developer tools

Hi all, I’m new here and I’d like to apologise if this question isn’t exactly original, however, I haven’t found a satisfactory answer to my questions, so I’m posting this here anyway.

I’m getting started with Elixir and I haven’t quite figured out what IDE to use with it. I’d like to understand what tools are other Elixir developers using and I’d also like to highlight problems that I ran into while setting up my development environment. We might not be able to resolve all of them, but perhaps we might be able to resolve at least one.

I come from an IntelliJ background and here is the summary of what I’ve tried and where I’ve experienced problems:

  • IntelliJ with the Elixir plugin: as I mentioned above, IntelliJ would be my preferred IDE, however even after installing the Elixir plugin and setting both Elixir and Erlang SDKs, IntelliJ isn’t complaining about anything but auto-completion and definition lookups don’t seem to work. I’ve found a number of related issues, like this one, but haven’t been able to resolve this problem.
  • RubyMine with the Elixir plugin: I thought this should be very similar to IntelliJ, but I ran into a different problem when using RubyMine, I got an error “Elixir Module SDK is not defined” and even though there is a button next to it that says “Setup Elixir Module SDK”, nothing happens when I click it. If I go into Preferences --> Languages & Frameworks --> Elixir --> SDKs and if I try to set an Elixir SDK, I get an error “Cannot save settings: please specify a different SDK name”. At least here I had an error to work with, but after about 20 minutes I’ve given up and decided to try option 3 (below)
  • VS Code with the Elixir extension: This option works the best and I’m actually beginning to like VS Code. My biggest and so far the only problem is refactoring. In IntelliJ (or related tools) it’s as easy as Ctrl+T and all uses and definitions of the thing you are trying to refactor are updated, whereas in VS Code this seems like a major hassle. I’ve found ways to change a definition within a file but not throughout the project. If anyone has any suggestions here, then please let me know

Thank you all in advance for reading!

Marked As Solved

drl123

drl123

I noticed you were using the Homebrew installed packages in the screenshot, so I tried on my daughter’s iMac which had nothing installed previously and is running Catalina. Did a fresh install of Homebrew, Erlang and Elixir and the latest version of RM. I had zero issues. Did you happen to ever set up Elixir via any other method (like ASDF, etc.)? Perhaps the Homebrew one is not active?

Deleting the .idea folder may help. I’ve had issues in the past trying to share an Elixir project with IntelliJ CE and RM. The .iml files are slightly different and it would screw up the second IDE you tried.

I did play around with VSCode today a little. Takes a lot of set up/plugins to get what comes natively with RM and IntelliJ Elixir…still missing a few things like the nice test runner, but it works. Im still partial to the JetBrains IDE’s though, maybe just familiarity.

If you are still interested in getting it going, file an issue with @KronicDeth on the plugin GitHub. He’s been super helpful when I’ve been stuck or had issues.

Also Liked

mpalmer

mpalmer

I’m pretty new to elixir as well, with a similar background as you (IntelliJ for most projects). I found that VSCode was (as you said) surprisingly nice. Refactoring is definitely a challenge, though I can’t say I have found it too much of an issue.

I work in a windows environment, though I prefer linux, and have found that WSL2 with alpine does everything I need. VSCode connects to it directly, and iex is much more pleasant (autocomplete works, pretty colors).

For me the biggest shift, coming from intellij and java and huge unwieldy codebases, is the simplicity. Building systems in Elixir (and they certainly feel and act like systems rather than plain old applications), somehow manages to organize complexity in a clean and manageable way. Having an IDE for Java is almost always necessary because there are often so many pieces flying around that it helps keep them all straight. With Elixir, it all just doesn’t seem so messy.

I hope this helps - your background definitely sounds a lot like mine, so I can understand the initial struggle to get comfortable with Elixir. But certainly it is worth every discomfort and mind-shift.

axelson

axelson

Scenic Core Team

Personally, I use Doom Emacs with ElixirLS for development. But my general sense is that the majority of Elixir developers now use VSCode (and VSCode is significantly easier to get started with than Emacs). So VSCode is my general recommendation (with ElixirLS and not vscode-elixir since it is not maintained).

With Elixir, it is generally reasonable to use generic project-wide (and sometimes single-file) search and replace to refactor variable names. Or at least reasonable enough that no-one’s created tooling to do context-aware refactoring. But if someone were to implement refactoring in ElixirLS that would be much appreciated and could then be used across a large variety of editors.

NeutronStein

NeutronStein

You can try Onivim2 which gives you the best of vim and vscode. It is very fast, nice and neat. :wink:

Where Next?

Popular in Questions Top

sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
earth10
Hi, I’m just starting to build a side-project with Elixir and Phoenix and doing some basic test with Elixir alone. What strikes me is th...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
nobody
Hi! In PHP: $SERVER['SERVERADDR'] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New

Other popular topics Top

sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
AstonJ
Please see the new poll here: Which code editor or IDE do you use? (Poll) (2022 Edition) It’s been a while since we first asked this, I...
208 31107 143
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

We're in Beta

About us Mission Statement