elixir_sense
elixir_sense copied to clipboard
Get Behaviour callback defined spec when showing type def of the implementation
Environment
- Elixir & Erlang versions (elixir --version): Erlang/OTP 24 - Elixir 1.12.2
- Operating system: ArchLinux
- Editor or IDE name (e.g. Emacs/VSCode): NVim
- Editor Plugin/LSP Client name: nvim-lspconfig
Troubleshooting
- [x] Restart your editor (which will restart ElixirLS) sometimes fixes issues
- [x] Stop your editor, remove the entire
.elixir_lsdirectory, then restart your editor- NOTE: This will cause you to have to re-run the dialyzer build for your project
When I hover over a function implementation of a callback, it shows me term typespec instead of the defined callback typespec. ie.
defmodule MyBehaviour do
@callback print(name :: binary()) :: :ok
end
defmodule MyPrinter do
@behaviour MyBehaviour
@impl true
def print(name), do: :ok
end
Hovering to MyPrinter.print displays MyPrinter.print(term) and it should be MyPrinter.print(binary) :: :ok
How can I see the correct function typespec?