What code editor do you use for Elixir development?

is this supposed to work without any further configuration? The is no init.vim and I think that packer should be conigured there?

NeoVim 0.5 supports pure Lua configuration.

2 Likes

Some features might not work for you, because of hardcoded configuration (like path to LSP server) or because system-wide dependencies are absent.
init.nvim is replaced by init.lua. Packer is configured in lua/plugins.lua

1 Like

ok thats it, I had 0.4 installed. packer works with 0.6-dev.

Works for me with 0.5 as well.

That’s cool! I think I copied it from here but I can’t remember. I had done my own and forgot to commit it then lost it and was annoyed so found yours :slight_smile: Never heard of vim-makery but I’m checking it out.

BTW I have updated my template, and now it uses module attribute instead of the alias:

let g:projectionist_heuristics['mix.exs'] = {
            \ 'apps/*/mix.exs': { 'type': 'app' },
            \ 'lib/*.ex': {
            \   'type': 'lib',
            \   'alternate': 'test/{}_test.exs',
            \   'template': ['defmodule {camelcase|capitalize|dot} do', 'end'],
            \ },
            \ 'src/*.erl': {
            \   'type': 'src',
            \   'alternate': 'test/{}_SUITE.erl',
            \ },
            \ 'test/*_test.exs': {
            \   'type': 'test',
            \   'alternate': 'lib/{}.ex',
            \   'template': ['defmodule {camelcase|capitalize|dot}Test do', '  use ExUnit.Case', '', '  @subject {camelcase|capitalize|dot}', '', '  doctest @subject', 'end'],
            \ },
            \ 'mix.exs': { 'type': 'mix' },
            \ 'config/*.exs': { 'type': 'config' },
            \ '*.ex': {
            \   'makery': {
            \     'lint': { 'compiler': 'credo' },
            \     'test': { 'compiler': 'exunit' },
            \     'build': { 'compiler': 'mix' }
            \   }
            \ },
            \ '*.exs': {
            \   'makery': {
            \     'lint': { 'compiler': 'credo' },
            \     'test': { 'compiler': 'exunit' },
            \     'build': { 'compiler': 'mix' }
            \   }
            \ }
            \ }
3 Likes

I see now why you brought up vim-markery—I literally blindly copied that, haha! I was really annoyed at my stupidity for losing my old one. I need to put some love into it and make it more my own.

RubyMine with Elixir plugin

1 Like

I do the same, but I already owned a copy of RubyMine. If you are looking for something free/OS, you can use IntelliJ CE with the same plugin. IntelliJ CE does not include a DB tool like RM, but being a ‘full IDE’, it allows more integration with the Elixir plugin.

For me, RubyMine and the Elixir plugin work perfectly fine with very little config (just tell it where to find Erlang and Elixir installs). The test runner and graphical debugger are great. Plus, I’m already used to RM for my day job. :wink:

2 Likes

vscode, I like the autocomplete (beginner)

Have been working with elixir in vscode for the past 2+ years and I think it’s an excelent experience out of the box. The only complaint I have with Elixir LS is that it doesn’t format my eex and heex files and I have to go about wiring up other formatters into vscode that do even worse. In the end, my team and I usually avoid auto-formatting any HTML files because of that (which is kinda a PITA sometimes).

I even use TabNine plugin for AI auto complete Elixir code in RubyMine

Emacs for all languages.

1 Like

Switched from Spacemacs to Centaur Emacs last night and I am very pleased with it so far. It’s much faster than Spacemacs, on a Mac at least. Yet another gateway drug to VIM which I absolutely will move to at one (ever-approaching) point.

4 Likes

@dimitarvp if you want to get started with VIM, there’s an awesome guide here. I just used it to set up my elixir development environment

Thank you. A piece of feedback: something that is not appealing to me in that guide is sticking to VimScript and not doing your config in Lua.

1 Like

@fuelen has posted his lua config here: What code editor do you use for Elixir development? - #20 by fuelen

works fine if you got at least nvim 0.5 installed.

Note, that you need to have one of the GitHub - ryanoasis/nerd-fonts: Iconic font aggregator, collection, & patcher. 3,600+ icons, 50+ patched fonts: Hack, Source Code Pro, more. Glyph collections: Font Awesome, Material Design Icons, Octicons, & more installed for nerd-tree to look nice.

1 Like

same here! i moved every VimScript setting to the corresponding Lua setting. Took me a bit of time to figure everything out but now everything is in Lua.
This and this Guide helped me a lot. If you want, i can send a link to my dotfiles

1 Like

I know, man, he posted it before and I’ve used his config already – still can’t decide between it and LunarVim :003:

And yep, I’ve been using the nerd fonts in iTerm2 and Alacritty for a while now.

Thanks for your concern. :heart:

I have to say, using NeoVim with Alacritty has been a super nice experience.