Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszsamson committed Jul 11, 2023
1 parent 0481fb8 commit 6bc501c
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions apps/language_server/lib/language_server/providers/completion.ex
Original file line number Diff line number Diff line change
Expand Up @@ -252,20 +252,25 @@ defmodule ElixirLS.LanguageServer.Providers.Completion do
_options
) do
name_only = String.trim_leading(name, "@")
insert_text = case String.split(prefix, "@") do
[_ | attribute_prefix] -> if String.starts_with?(name_only, attribute_prefix) do
name_only
else
name

insert_text =
case String.split(prefix, "@") do
[_ | attribute_prefix] ->
if String.starts_with?(name_only, attribute_prefix) do
name_only
else
name
end

_ ->
name
end
_ -> name
end

%__MODULE__{
label: name,
kind: :variable,
detail: "module attribute",
documentation: name <> "\n" <> (if summary, do: summary, else: ""),
documentation: name <> "\n" <> if(summary, do: summary, else: ""),
insert_text: insert_text,
filter_text: name_only,
priority: 14,
Expand Down

0 comments on commit 6bc501c

Please sign in to comment.