VS Code 1.60.1, ElixirLS 0.8.1, Erlang 24.0.5, Elixir 12.0.3.
Kubuntu 21.04. with VS Code with remote development in Kubuntu 20.04.
Should intellisense work on nested structs? Eg. user defined struct with other struct fields, for example DateTime or another user defined struct. In code snippet below “dot” does not work for created DateTime-struct fields. In terminal iex-session autocomplete and tabbing works.
There are no errors in ElixirLS output window. I have tried removing .elixir_ls folder and different versions of VS Code and ElixirLS 0.8.0. I compiled ElixirLS with Erlang 24 and Elixir 12 but no difference.
defmodule P do
defstruct [:name, :created]
@type t :: %__MODULE__{
name: String.t(),
created: DateTime.t()
}
@spec new(name :: String.t()) :: t()
def new(name)
when is_binary(name) do
%__MODULE__{name: name, created: DateTime.utc_now()}
end
def get_info(%P{} = p) do
p.created
end
end