voger

voger

How to set up Vim for elixir?

I am trying to adopt a workflow for elixir using Vim and tmux but I do have some problems with elixir code completion and most importantly “go to definition”. Some times code completion doesnt work and some times “go to definition” throws errors.

I am using elixir-editors/vim-elixir and slashmili/alchemist.vim with Shougo/deoplete.nvim

For example in this file

Towards the middle it has a line conn = build_conn() |> auth_user(user) and I want to jump to the definition of auth_user which is a private function defined in the same file.

With <Ctrl+]>, even after I compiled the project, in vim I get

alchemist.vim: failed with message error:/home/voger/.vim/plugged/alchemist.vim/elixi
r_sense/lib/elixir_sense/core/ast.ex:19: module PlateSlateWeb.ConnCase is not loaded
and could not be found
E426: tag not found: auth_user

while spacemacs jumps happily to the definition.

Here is my .vimrc.

Is there something I should configure differently to improve elixir experience in vim?

Most Liked

Last Post!

voger

voger

@kaareltinn
Thanks. Indeed it works much smoother now.

Also I changed deoplete with youcompleteme. I will see how it goes.

P.S.: Any other tips/advice are welcome :smiley:

Where Next?

Popular in Questions Top

skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

Other popular topics Top

rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
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...
274 42716 114
New

We're in Beta

About us Mission Statement