IVR

IVR

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!

Showing Posts 1 to 10

rodesousa

rodesousa

I use neovim + coc with elixir extension

For a non vim user, it’s rough at begining but you have everything you need

crova

crova

Same here (although I’m actually using Vim + alchemist vim).
I found out that I needed way less setup/plugins to get everything I needed compared to my Ruby/RoR setup.

IVR

IVR OP

@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:

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.

IVR

IVR OP

Great, thank you for sharing!

Your background does indeed seem similar to mine which means you’d probably understand how I ended up with a minor panic attack when I switched to a dynamic language with a fairly loose IDE :laughing: I have to agree that I haven’t found this to be a problem yet, I was just thinking about what happens further down the line because I would like to develop some stuff with Phoenix. Given the nature of the language, I can understand how my concerns may be exaggerated, so I’ll proceed with VS Code for now.

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.

IVR

IVR OP

Ah, it works, excellent! It looks like there are a bunch of plugins for this and VS Code internal capabilities some of which just don’t work while others only work with specific languages, but this command seems to have done the trick. Thanks for sharing! BTW, for anyone using a Mac it’s CMD+SHIFT+H

drl123

drl123

FYI - have had a lot of success with using the Elixir plugin for Rubymine. It’s a little awkward to set the SDK, but after that, it works well. Under Languages in Preferences, click the arrow to expand Elixir and show the SDK options for Elixir and Erlang. Click the + under each and you’ll have to set the path by navigating to the appropriate directory where you have installed each. In my case, using ASDF, it’s under ~/.asdf/installs/elixir/<your version here>. Do this for Elixir under SDKs and Erlang under Internal Erlang SDKs. After that, you should see this version of Elixir in the SDK selection for the language (i.e. with the drop-down collapsed).

I haven’t gotten to try Vscode yet. I see a lot of folks using it, but I also use RM for my day job, so it’s more about familiarity than anything for me. The debugger works well for Elixir too.

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.

IVR

IVR OP

Yeah, that’s what I tried originally, but that didn’t work. I get an error: “Cannot Save Settings: Please specify a different SDK name”. Based on quick research it means that the SDK is already set somewhere, but I’m not sure where. If I open an Elixir project, it warns me that there is no Elixir SDK and if I click on the corresponding button to “Set Elixir Module SDK” nothing happens.

Where Next? Top

Trending in Questions Top

Blokh
Hey guys, I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly Do you guys have any suggestions what is the best prac...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
matt-savvy
Anyone here using Honeybadger? My Honeybadger account is being overwhelmed with noise from some bots. Seeing a lot of Bandit.HTTPError...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge &amp; Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews