From 002cc0a6de4a72f04594412e9d856c751b365f18 Mon Sep 17 00:00:00 2001 From: Lukasz Samson Date: Fri, 27 Oct 2023 20:09:09 +0200 Subject: [PATCH] format --- lib/elixir_sense/core/introspection.ex | 12 +++++++----- lib/elixir_sense/core/surround_context.ex | 3 ++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/elixir_sense/core/introspection.ex b/lib/elixir_sense/core/introspection.ex index bc028703..16023f45 100644 --- a/lib/elixir_sense/core/introspection.ex +++ b/lib/elixir_sense/core/introspection.ex @@ -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) @@ -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 diff --git a/lib/elixir_sense/core/surround_context.ex b/lib/elixir_sense/core/surround_context.ex index 1d40adc6..5a3149fe 100644 --- a/lib/elixir_sense/core/surround_context.ex +++ b/lib/elixir_sense/core/surround_context.ex @@ -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}"}