elixir_sense icon indicating copy to clipboard operation
elixir_sense copied to clipboard

Presence of `def` in autocompletion of GenServer methods

Open smithjessk opened this issue 7 years ago • 1 comments

Migrated from vscode-elixir.


I see the handle_call autocomplete option when I have the following code snippet:

defmodule TestVscodeAutocomplete do
  use GenServer

  handle_call
end

However, I when I autocomplete handle_call by hitting enter, I get:

defmodule TestVscodeAutocomplete do
  use GenServer

   handle_call(request, from, state) do
    
  end
    
end

with the extra space before the function name and lack of the def keyword.

When I autocomplete with the def keyword (i.e. from def handle_call), I get:

defmodule TestVscodeAutocomplete do
  use GenServer

  def def handle_call(request, from, state) do
    
  end
  
end

The same problem also exists for handle_info and handle_call.

Please let me know whatever other information you would like from me. Thanks!

smithjessk avatar Nov 07 '17 18:11 smithjessk

I think I'm seeing the same thing with Application.

defmodule AutoComplete do
  use Application

   start(start_type, start_args) do
    
  end
  
  def def start(start_type, start_args) do
    
  end
  
end

Justin-E-Taylor avatar Dec 09 '17 16:12 Justin-E-Taylor