@@ -87,45 +87,6 @@ defmodule ElixirSense.Providers.Definition do
87
87
end
88
88
end
89
89
90
- # defp find_function_or_module({nil, nil}, mods_funs_to_positions, mods_funs, current_module, imports, aliases) do
91
- # {nil, nil}
92
- # |> Introspection.actual_mod_fun(imports, aliases, current_module, mods_funs)
93
- # |> find_source(current_module)
94
- # end
95
-
96
- # defp find_function_or_module({module, function}, mods_funs_to_positions, mods_funs, current_module, imports, aliases)
97
- # when is_atom(function) do
98
- # # TODO arity info would be useful here
99
- # # TODO support local typespecs
100
-
101
- # fun_module =
102
- # case module do
103
- # nil -> current_module
104
- # mod when is_atom(mod) -> mod
105
- # end
106
-
107
- # case mods_funs[{fun_module, function, nil}] do
108
- # nil ->
109
- # # module or function not found in buffer metadata, try introspection
110
- # {module, function}
111
- # # TODO
112
- # |> Introspection.actual_mod_fun(imports, aliases, current_module, mods_funs)
113
- # |> find_source(current_module)
114
-
115
- # %{positions: positions} ->
116
- # # for simplicity take first position here
117
- # [{line, column} | _] = positions
118
-
119
- # %Location{
120
- # found: true,
121
- # file: nil,
122
- # type: fun_to_type(function),
123
- # line: line,
124
- # column: column
125
- # }
126
- # end
127
- # end
128
-
129
90
defp find_source ( { mod , fun } , current_module ) do
130
91
with (
131
92
{ mod , file } when file not in [ "non_existing" , nil , "" ] <- find_mod_file ( mod ) ,
0 commit comments