Skip to content

Commit

Permalink
format on 1.15
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszsamson committed Jul 6, 2023
1 parent db027be commit bf6db49
Show file tree
Hide file tree
Showing 4 changed files with 211 additions and 207 deletions.
4 changes: 2 additions & 2 deletions lib/elixir_sense/core/surround_context.ex
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ defmodule ElixirSense.Core.SurroundContext do
{inside_dot_to_binding(inside_dot, current_module), :"#{charlist}"}
end

def to_binding({:local_or_var, '__MODULE__'}, current_module) do
def to_binding({:local_or_var, ~c"__MODULE__"}, current_module) do
if current_module not in [nil, Elixir] do
{:atom, current_module}
end
Expand Down Expand Up @@ -71,7 +71,7 @@ defmodule ElixirSense.Core.SurroundContext do
end

defp inside_dot_to_binding(
{:alias, {:local_or_var, '__MODULE__'}, inside_charlist},
{:alias, {:local_or_var, ~c"__MODULE__"}, inside_charlist},
current_module
) do
if current_module not in [nil, Elixir] do
Expand Down
6 changes: 3 additions & 3 deletions lib/elixir_sense/providers/suggestion/complete.ex
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ defmodule ElixirSense.Providers.Suggestion.Complete do
end

# elixir >= 1.14
defp expand_dot_path({:var, '__MODULE__'}, env) do
defp expand_dot_path({:var, ~c"__MODULE__"}, env) do
if env.scope_module != nil and Introspection.elixir_module?(env.scope_module) do
{:ok, {:atom, env.scope_module}}
else
Expand Down Expand Up @@ -252,7 +252,7 @@ defmodule ElixirSense.Providers.Suggestion.Complete do
# elixir >= 1.14
defp expand_dot_path({:alias, {:local_or_var, var}, hint}, env) do
case var do
'__MODULE__' ->
~c"__MODULE__" ->
alias_suffix = hint |> List.to_string() |> String.split(".")
alias = [{:__MODULE__, [], nil} | alias_suffix] |> value_from_alias(env)

Expand Down Expand Up @@ -483,7 +483,7 @@ defmodule ElixirSense.Providers.Suggestion.Complete do
|> format_expansion()
end

defp expand_prefixed_aliases({:local_or_var, '__MODULE__'}, hint, env, only_structs) do
defp expand_prefixed_aliases({:local_or_var, ~c"__MODULE__"}, hint, env, only_structs) do
if env.scope_module != nil and Introspection.elixir_module?(env.scope_module) do
expand_aliases("#{env.scope_module}.#{hint}", env, only_structs, [])
else
Expand Down
Loading

0 comments on commit bf6db49

Please sign in to comment.