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

Goto Definition & Autocompletion not working #157

Closed
facundokantox opened this issue Mar 20, 2020 · 4 comments
Closed

Goto Definition & Autocompletion not working #157

facundokantox opened this issue Mar 20, 2020 · 4 comments

Comments

@facundokantox
Copy link

Environment

  • Elixir & Erlang versions (elixir --version):
Erlang/OTP 22 [erts-10.6] [source] [64-bit] [smp:6:6] [ds:6:6:10] [async-threads:1] [hipe]

Elixir 1.10.0 (compiled with Erlang/OTP 21)
  • Operating system: macOS Catalina
  • Editor or IDE name (e.g. Emacs/VSCode): VSCode
  • LSP Client name:
  • If using VSCode, are you using "ElixirLS Fork: Elixir support and debugger" (note that it has "Fork" in the name)? Yes

Crash report template

These occur when pressing F12 (Goto definition) or when holding Command key + mouse click

[Info  - 5:55:42 PM] Returning location struct
[Info  - 5:55:42 PM] Returning location struct
[Info  - 5:55:45 PM] Returning location struct
[Info  - 5:55:45 PM] Returning location struct

These when calling/triggering auto-complete, but not right after: 'Loading...' appears and this is displayed after I click enter (even though nothing was displayed.)

[Error - 5:55:57 PM] Request textDocument/documentSymbol failed.
  Message: an exception was raised:
    ** (SyntaxError) nofile:20: syntax error before: ','
        (language_server 0.3.1) lib/language_server/providers/document_symbols.ex:35: ElixirLS.LanguageServer.Providers.DocumentSymbols.list_symbols/1
        (language_server 0.3.1) lib/language_server/providers/document_symbols.ex:20: ElixirLS.LanguageServer.Providers.DocumentSymbols.symbols/3
        (language_server 0.3.1) lib/language_server/server.ex:485: anonymous fn/3 in ElixirLS.LanguageServer.Server.handle_request_async/2
  Code: -32000 

17:55:57.357 [error] Process #PID<0.350.0> raised an exception
** (SyntaxError) nofile:20: syntax error before: ','
    (language_server 0.3.1) lib/language_server/providers/document_symbols.ex:35: ElixirLS.LanguageServer.Providers.DocumentSymbols.list_symbols/1
    (language_server 0.3.1) lib/language_server/providers/document_symbols.ex:20: ElixirLS.LanguageServer.Providers.DocumentSymbols.symbols/3
    (language_server 0.3.1) lib/language_server/server.ex:485: anonymous fn/3 in ElixirLS.LanguageServer.Server.handle_request_async/2

'Loading...' sign also appears on mouse over but nothing happens.

Developer tools

[Extension Host] ok:localhost:/tmp/elixir-sense-1584724345293026000.sock
[Extension Host] [vscode-elixir] ElixirSense client connected on localhost:/tmp/elixir-sense-1584724345293026000.sock
[Extension Host] [vscode-elixir] ElixirSense client connection closed
[Extension Host] [ElixirSense] 18:12:25.306 [error] Task ElixirSense.Server.TCPServer started from #PID<0.200.0> terminating** (stop) exited in: GenServer.call(ElixirSense.Server.TCPServer.ConnectionHandlerSupervisor, {:start_task, [{:nonode@nohost, #PID<0.200.0>, #PID<0.200.0>}, [#PID<0.200.0>, #PID<0.199.0>], {:erlang, :apply, [#Function<1.131136907/0 in ElixirSense.Server.TCPServer.start_connection_handler/2>, []]}], nil, nil}, :infinity)    
        ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started    
        (elixir 1.10.0) lib/gen_server.ex:1013: GenServer.call/3    /Users/facundodiaz/.vscode/extensions/mjmcloug.vscode-elixir-1.1.0/elixir_sense/lib/elixir_sense/server/tcp_server.ex:58: ElixirSense.Server.TCPServer.accept/2   
        (elixir 1.10.0) lib/task/supervised.ex:90: Task.Supervised.invoke_mfa/2    
        (stdlib 3.11) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Function: &ElixirSense.Server.TCPServer.listen/3    
        Args: ["unix", "localhost", "0"]
ok:localhost:/tmp/elixir-sense-1584724345307545000.sock

I can provide more info if needed. Thanks!!

@axelson
Copy link
Member

axelson commented Mar 23, 2020

It looks like you have vscode-elixir installed as well. I believe that the two extensions are not compatible with each other. Can you try removing vscode-elixir? Also are there any syntax errors in the file that you are operating on?

@facundokantox
Copy link
Author

It works after removing vscode-elixir. Didn't imagine that.
Thanks for your time, I will close the issue :)

@lukaszsamson
Copy link
Collaborator

@axelson It seems that vscode-elixir is causing a lot of issues. Maybe we should print a warning if we detect it.

@axelson
Copy link
Member

axelson commented Mar 23, 2020

Yeah that's a good idea. Filed it at elixir-lsp/vscode-elixir-ls#56

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

3 participants