Environment
Elixir & Erlang versions (elixir --version):
Erlang/OTP 26 [erts-14.2.5.4] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit:ns]
Elixir 1.17.3 (compiled with Erlang/OTP 26)
VSCode ElixirLS version: v0.24.2
Operating System Version: Ubuntu 22.04.5 LTS
Troubleshooting
Details
Given this code:
defmodule MyMod do
@type t :: %MyMod{
id: pos_integer(),
name: binary()
}
defstruct id: 0,
name: ""
@spec hello1(person :: MyMod.t()) :: MyMod.t()
defp hello1(person) do
IO.inspect(person)
end
@spec hello2(person :: MyMod.t()) :: MyMod.t()
defp hello2(%MyMod{} = person) do
IO.inspect(person)
end
@spec hello3(person :: MyMod.t()) :: MyMod.t()
defp hello3(person) do
p1 = hello1(person)
IO.inspect(p1)
end
def say_hello() do
person = %MyMod{
id: 123,
name: "Bob"
}
hello1(person)
hello2(person)
hello3(person)
end
end
Problem
Autocomplete/suggestions for the person variable do not work in the hello1() function

Expected result
Autocomplete/suggestions should work for the person variable in hello1() the same way they work in the hello2() function

Relevant info
Strangely enough, suggestions work for the p1 variable in the hello3() function

Environment
Elixir & Erlang versions (elixir --version):
VSCode ElixirLS version:
v0.24.2Operating System Version:
Ubuntu 22.04.5 LTSTroubleshooting
.elixir_lsdirectory, then restart your editorDetails
Given this code:
Problem
Autocomplete/suggestions for the

personvariable do not work in thehello1()functionExpected result
Autocomplete/suggestions should work for the

personvariable inhello1()the same way they work in thehello2()functionRelevant info
Strangely enough, suggestions work for the

p1variable in thehello3()function