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

Elixir v1.1.0 autocomplete #18

Closed
mr-bt opened this issue Sep 28, 2015 · 5 comments
Closed

Elixir v1.1.0 autocomplete #18

mr-bt opened this issue Sep 28, 2015 · 5 comments

Comments

@mr-bt
Copy link

mr-bt commented Sep 28, 2015

Hi,

I was having issues with the autocomplete upon upgrading to Elixir v1.1.0. The issue is on IEx.Autocomplete.expand:

16:39:33.139 [error] Task #PID<0.130.0> started from SublimeCompletion.Supervisor terminating
** (UndefinedFunctionError) undefined function: nil.current_env/0 (module nil is not available)
    nil.current_env()
    lib/iex/autocomplete.ex:172: IEx.Autocomplete.env_aliases/0
    lib/iex/autocomplete.ex:159: IEx.Autocomplete.expand_alias/1
    lib/iex/autocomplete.ex:145: IEx.Autocomplete.expand_elixir_modules/2
    (sublime_completion) lib/sublime_completion.ex:129: SublimeCompletion.expand/1
    (sublime_completion) lib/sublime_completion.ex:41: SublimeCompletion.read_line/1
    (sublime_completion) lib/sublime_completion.ex:29: SublimeCompletion.loop/1
    (elixir) lib/task/supervised.ex:74: Task.Supervised.do_apply/2
Function: &SublimeCompletion.connect/1
    Args: [50625]

It happens because of the following commit: elixir-lang/elixir@5e21d0d

My simple fix was to add to the sublime_completion config.exs:

config :iex,
      autocomplete_server: IEx.Server,

Bruno.

@tfindlow
Copy link

tfindlow commented Oct 6, 2015

Putting iex in the applications list in module SublimeCompletion.MixFile works too.

defmodule SublimeCompletion.Mixfile do

use Mix.Project
...
def application do
[
applications: [:iex, :logger, :poison],
mod: {SublimeCompletion, []}
]
end
...
end

@rutchkiwi
Copy link

+1

@ThomasKliszowski
Copy link

Same here, is it working with older versions of Elixir?
If so, maybe we can submit a Merge Request.

@ghost
Copy link

ghost commented Nov 30, 2015

+1 to the fix suggested by @mr-bt

@gouthamvel
Copy link

👍 @tfindlow solution worked for me thanks

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

5 participants