Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Presence of def in autocompletion of GenServer methods #15

Open
smithjessk opened this issue Nov 7, 2017 · 1 comment
Open

Presence of def in autocompletion of GenServer methods #15

smithjessk opened this issue Nov 7, 2017 · 1 comment

Comments

@smithjessk
Copy link

smithjessk commented Nov 7, 2017

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!

@Justin-E-Taylor
Copy link

Justin-E-Taylor commented Dec 9, 2017

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

lukaszsamson pushed a commit to lukaszsamson/elixir_sense that referenced this issue Jul 27, 2019
…_from_iex

* port elixir iex autocomplete tests form 1.2 branch

* Only expand Erlang modules when ':' is a prefix

* Improve expand to handle '&'.

* Port changes from update iex autocomplete to show new functions in reloaded modules

* cleanup and comments added

* Port resolves issue with autocompletion on structs not working

* Stop appending a trailing dot when autocompleting modules

* Tidy up trimming of leading & and % chars

* Only expand aliases known at compile time

* Skip autocompletion of module names that are invalid without being quoted

* Ensure module is loaded before function exported check

* port podernizations

* properly translate new docs api to old format

* add integration tests

* update no longer valid doc

* remove buildins

* fix crash in split_mod_quoted_fun_call when splitting unknown module function call

* fix annoying %Struct.__struct__ expansion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants