Code autocomplete problem

Hi I’m using vs code and the forked Elixir-LS extension.

It gives me nice auto formatting on save and some warnings etc, but poor auto completing.

It only seems to work for module/functions not for variables.
For instance if have somevar which holds a struct (with type specs).
when I type somevar. it will error immediately after I press the .

[Error - 2:10:53 PM] Request textDocument/completion failed.
  Message: an exception was raised:
    ** (FunctionClauseError) no function clause matching in :elixir_aliases.do_concat/2
        (elixir) src/elixir_aliases.erl:130: :elixir_aliases.do_concat([{:somevar, [line: 35, column: 5], nil}, :Agent], "Elixir")
        (elixir) src/elixir_aliases.erl:118: :elixir_aliases.concat/1
        (elixir_sense) lib/elixir_sense/core/metadata_builder.ex:925: ElixirSense.Core.MetadataBuilder.pre/2
        (elixir) lib/macro.ex:290: anonymous fn/4 in Macro.do_traverse_args/4
        (elixir) lib/enum.ex:1440: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
        (elixir) lib/enum.ex:1440: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
        (elixir) lib/macro.ex:256: Macro.do_traverse/4
        (elixir) lib/macro.ex:271: Macro.do_traverse/4
  Code: -32000

Does’t really matter what I do, as soon as I have the . this error shows up.

Which version of the LS is used?

The LS should not error in this case.

Though it will probably also not give you much of completion anyway, as field completion only happens in struct literals as far as I remember.

There is no type Info available otherwise.