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:

IVR

IVR

@crova and @rodesousa, thank you for sharing! I was hoping to get one of the JetBrains IDEs or VS Code working here, but if vim happens to be the objectively better option here, then I’ll consider switching further down the line. Either way, it’s good to know that there is a good solution out there even if I’m not a fan of it :slight_smile:

stiegi

stiegi

In VSCode I use CTRL + SHIFT + H to replace something in all files of the project, and then there is this tiny symbol next to the filenames that applies the change, it appears as soon as you select a file.

Where Next?

Popular in Questions Top

srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
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
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
dokuzbir
Hello, I am trying to convert my lists to string without losing brackets.For start i have 3 map. They look like these buyer = %{ id: ...
New
Phillipp
Hey, I have a NanoPi-M3 and try to install Elixir on their Ubuntu image. I followed the Raspberry Pi installation instructions from the ...
New
chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
Mooodi
Given a string, how can I get access to its character by index? Enum.at("my_string", 2) doesn't work. Or rather, not char, but a substr...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New

Other popular topics Top

pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
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
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
sergio
I couldn’t find any guides that worked well with Phoenix 1.6.0 and esbuild. I hope this helps people test the waters and eases you into t...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 35421 110
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
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
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
273 38985 115
New

We're in Beta

About us Mission Statement