Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszsamson committed Oct 27, 2023
1 parent 07dce16 commit 002cc0a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
12 changes: 7 additions & 5 deletions lib/elixir_sense/core/introspection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ defmodule ElixirSense.Core.Introspection do
case List.keyfind(callbacks, key, 0) do
nil ->
raise "Unable to find callback #{inspect(key)}, callbacks were #{inspect(Enum.map(callbacks, &elem(&1, 0)))}"

{_, [spec | _]} ->
spec_ast =
Typespec.spec_to_quoted(spec_name, spec)
Expand Down Expand Up @@ -1148,11 +1149,12 @@ defmodule ElixirSense.Core.Introspection do
{functions, macros} =
list
|> Enum.reduce([], fn {module, opts}, acc ->
opts = if Keyword.keyword?(opts) do
opts
else
[]
end
opts =
if Keyword.keyword?(opts) do
opts
else
[]
end

all_exported =
if acc[module] != nil and Keyword.keyword?(opts[:except]) do
Expand Down
3 changes: 2 additions & 1 deletion lib/elixir_sense/core/surround_context.ex
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ defmodule ElixirSense.Core.SurroundContext do
defp to_binding_impl({:alias, {:local_or_var, _charlist1}, _charlist}, _current_module), do: nil

# TODO handle this case?
defp to_binding_impl({:alias, {:module_attribute, _charlist1}, _charlist}, _current_module), do: nil
defp to_binding_impl({:alias, {:module_attribute, _charlist1}, _charlist}, _current_module),
do: nil

defp to_binding_impl({:dot, inside_dot, charlist}, current_module) do
{inside_dot_to_binding(inside_dot, current_module), :"#{charlist}"}
Expand Down

0 comments on commit 002cc0a

Please sign in to comment.