What code editor do you use for Elixir development?

Would gladly bookmark them for the future – right now I have no time and energy.

New to programming, I’ve used vscode from the start, mostly ‘out-of-the-box’, with the exception of docker and the excellent elixir_ls extensions.

I may be new to programming, but I’m not new to software dev and I did use emacs to edit resource forks on some sound files on an apple computer - that was a bazillion years ago and I remember clearly at the time being baffled by its use! :grin:

1 Like

I use atom, with a few small plugins(atom-elixir-formatter, elixir-block, language-elixir). I don’t use the language server.

This has been a game changer for me… catching error in the editor increase code’s confidence.

I use vscode with elixir_ls, and vim on remote server.

I have been thinking about switching to vs code for a while to try it(even though I think there is a version for atom). In general it’s one of those things I think, until you don’t try it you don’t miss it.
I might give it a proper go, thanks!

1 Like

I am willing to give vim a try on my remote machine.

can you share vim config in lua?

Spacevim for development and VScodium as a git gui.

While I think VSCode is an excellent editor these days (I use it daily for React), it does have the bad habit of having me reach for the mouse all the time. While almost everything is bindable the UI in itself (same as most GUI first interfaces) makes certain sings cumbersome (or impossible with keyboard only).

That is the main reason I keep coming back to Emacs and Vim, more so than configurability, which I am not entirely sure I see as a net win anymore due to endless procrastination possibilities :slight_smile:

3 Likes

Sure! My NeoVim Dotfiles

1 Like

I’ve just spent half the day getting set up with LunarVim – I’d been using VSCode, but I can’t stand the file browser – too many icons and colors in it (all I need to know is files vs directories – I can read the filename / extension to learn everything else I need to know) – and I also don’t like how much I have to use the mouse in VSCode.

I’ve used many things over the years, including longish periods exclusively in vim, emacs and IntelliJ. Overall IntelliJ has been my favourite balance between capacity & ergonomics, but for extrinsic reasons I’ve settled on VS Code for most things including Elixir (the maintainers have done a lovely job with ElixirLS extension). It does some things excellently, most things competently, and has the benefit of a huge and active “ecosystem”. Any IDE/editor I use tends to end up looking much the same as I always hide nearly all UI elements other than the editor text by default, leaving me with a window of text, more or less.

For anyone who likes vi keybindings, I recommend having a play with the VSCode Neovim plugin, which uses Neovim as a text editing backend for VSCode. There are a few hiccups and impedance mismatches here and there, but with a bit of init.vim and VSCode configuration it works nicely. I like being able to share shortcuts & vim plugins between VSCode and nvim (which I use for fast in-terminal edits).

I think the keyboard shortcut issue is often a bit overblown (even fetishised sometimes). I haven’t used an IDE for years which didn’t allow all the important (high frequency) actions to be done using the keyboard, and for the less frequently used (& remembered) ones, a mouse + GUI elements and/or a command palette are efficient means of discovery. Something I miss from IntelliJ is the built-in ‘productivity guide’ which records & tabulates how much you use the various IDE actions, giving an objective basis on which to learn (or add) keyboard shortcuts. It also has a plugin (something like ‘key promoter’?) which automatically suggests shortcuts for editor actions you perform with a mouse.

2 Likes

I’m a numpty and quite happy about it. VSCode doesn’t irritate me too often (unlike MS Word). I’m a casual coder so the investment in learning arcane (but productive) keybindings isn’t worth it for me. I find Atom quite sluggish, but I have it configured without ElixirLS for developing Rust NIFs on Windows - ElixirLS maintains file locks on the Rust build artifacts which prevents re-compilation.

I am pretty new to vim.

I just made myself a little comfortable editing text and navigating. I used your config files and they are great right out of the box!

I am yet to learn about packer.nvim or package installation to install one myself.

when I run :PackerSync it says /home/fuelen/projects/elixir-ls/language_server.sh failed. The language server is either not installed, missing from PATH, or not executable.

Can you help with this?

You need to change the path to the ElixirLS somewhere in the configuration to point it to your installation.

I don’t know “if or where” elixir-ls is installed. I used vscode previously and it was a breeze using extensions in vscode.

I hope to find language_server.sh file somewhere or somehow.

You need to install it on your own, as Vim do not manage that for you (in contrast to the VSC).

A good tutorial would be of help. :slight_smile:

Clone elixir-ls to any directory in your system, cd to it, mix deps.get, mix elixir_ls.release -o . The latter command will generate necessary files in current directory.
Then adjust path to server in lua/plugins/lspconfig.lua. Perhaps, there is a simpler way, but this is what I did.

2 Likes

I did that and ran

:PackerSync
but got
LSP[elixirls] ElixirLS has crashed. See Output panel.

It may be a case, that the project which is open uses lower Elixir version than the version which was used for elixir-ls compilation.