What code editor do you use for Elixir development?

I’ve seen people use following

  1. Emacs
  2. Vim
  3. Spacemacs
  4. Onivim2
  5. Vscode

Vscode’s file navigation - I don’t prefer it. It is confusing.

Would love to know the pro/cons of the elixir tooling present in different editors. (Or maybe from the future prospect of features)

P S. This is not another “which editor is best debate”. Really, just which one has better tooling support for Elixir development.

I use Vscode but I really miss IntelliJ :cry: the latter being quite expensive

1 Like

Can’t you use a free version of one of the Jetbrains IDEs? Jetbrains test runners and debug are great.

I have all the all products pack which is about $150/yr(?), which is not many hours work.

Pretty much all editors have the LSP so I don’t think there are huge differences between the popular ones. If you’re old use Emacs, if you’re cool use vim, if you’re a numpty use vscode, if you are rich use Jetbrains.

1 Like

I’m a poor, occasionally old, cool and numpty person!

For Elixir I currently use VSCode as it works well enough out of the box and I use it for React due to Emacs & Vim not doing JSX+Typescript very well. (And text rendering is much better than Emacs on macOS).

If I were to work full time in Elixir I’d likely look into getting old(er) and make sure to have Emacs setup properly for it.

I use Vim for pretty much everything else (and often use it inlined in the VSCode terminal for committing and opening files outside the project)

Been using Emacs for 20 years, Spacemacs for the last 2, and looking to move to NeoVim / LunarVim sometime Soon™. NeoVim is just so much faster in everything it does, I love it. Emacs / Spacemacs is sluggish and super slow at times and it gets on my nerves because I have a fairly solid workstation and literally everything else flies.

I found Spacemacs to feel really sluggish when I last tried it, you should give Doom a shot. It’s extremely snappy in comparison (granted it was a while ago that I last tried Spacemacs so it might have improved since then).

1 Like

I probably should try it indeed, the question is how quickly I’d be able to get the same functionality as Spacemacs.

I’m so fed up that anything beyond 1 hour will likely put me off.

I have also seen another very promising candidate: CentaurEmacs.

I’ve tried all but emacs and onivim. Onivim is interesting but development seems to have stopped.

Spacemacs is too crazy for me. Vscode works fine.

I’d like to try out (neo)vim again. Is it possible to just load a config and is set up for elixir development?

I used to use Vim since forever and last year I moved to doom.
It is sluggish sometimes, specially with laaaaarge files, but thankfully I don’t stumble upon that many huge files to be deterrent.
I can’t really live without org anymore so I accept the sluggishness when it comes.

I use terminal emacs with just elixir-mode, not the one based on language server. It is snappy even on a lame VPS.

I don’t want to be spoiled by fancy tools so I can’t be productive in a lesser environment. I figured terminal emacs with a few ELPA packages should be available anywhere.

Yes, definitely. It’s just that at this point I’m so fed up that I will not even give Emacs these few other last chances. :003:

I’ve used terminal vim for several years now (I think since 2011 or '12). I’m thinking of switching to nvim but I’m lazy about it.

I make use of projectionist for navigation. So far I’ve copied a config (I forget who the author was, sorry) but now that I’m finally starting my first Elixir job in a couple of weeks, I want to flesh it out a bit more (but really, jumping between implementation and test goes a long way).

Other than a fuzzy finder, I also really like NERDTree but always have it set to auto-close on opening a file. I mostly use it to get my bearings and have mappings for toggling it as well as revealing the current file in the tree.

I feel like I would enjoy a good LSP but, again, I’ve been lazy about it. I do know I have alchemist and mix.vim installed… one of them gives me the ability to hit gf on a module and jump to its implementation, but I forget which. I really need to sort this out now!

I’ve tried VS Code several times since it was launched, however after a couple of days I always return to Sublime Text.

For Elixir development I use the LSP and LSP-elixir packages for Sublime Text.

Whenever I use another editor I always miss the GitSavvy package functionality in Sublime Text. I find the git management in VS Code too clumsy.

+1 for doom emacs. It works right out of the box, except I have to tell LSP to chill out by putting this in ~/.doom.d/config.el:

(setq lsp-file-watch-ignored
      '(".idea" ".ensime_cache" ".eunit" "node_modules"
        ".git" ".hg" ".fslckout" "_FOSSIL_"
        ".bzr" "_darcs" ".tox" ".svn" ".stack-work"
        "build" "_build" "deps")
      )

I had to do this for spacemacs too, when I used it.

2 Likes

I have a list 3 times bigger than that and Emacs still manages to complain about not being able to watch directories due to no file descriptors left.

Trust me, I have configured macOS to give a lot of file handles to each process (and increased the global limit). Nothing helps. Eventually somebody here in this forum told me that Emacs controls the limit as a compile-time constant which is dumb beyond belief.

I use neovim, but trying helix is in my TODO list

Currently using Codium (the VSCode without proprietary metrics, basically) with the ElixirLS support.
Not all works everytime, but usually deleting the .elixir-ls directory fixes a lot of issues :smiley:

To say that I’m not used to work with git ide integrations, I usually use command line because I’m old and grumpy :slight_smile:

can you share your config?

1 Like

Assuming by the use of the vim-makery - it is mine.

Alchemist


About the topic - I am happy NeoVim user and so far I do not have any plans in moving away from it.

1 Like

Sure

3 Likes