After defining @spec for a function, when I hover over a variable, I still get no information
Example code:
defmodule Testing do
@type status :: :won | :lost
@type t :: %__MODULE__{
status: status()
}
defstruct(status: :won)
@spec action(t()) :: status()
def action(state) do
state.sttus
end
end
In the code above, it I hover over “state” (line 10 and 11), VsCode and Neovim only shows that it is a variable (no type information). Therefore the LSP is also unable to catch it when I typed the wrong field “stts” instead of “status”.
Is this the intended behavior or is my setup broken/incorrect?