Skip to content

Commit 3166904

Browse files
committed
remove no longer necessary workaround
elixir_sense used to return module attributes in function scope this is no longer the case this workaround effectively disabled module attribute completions
1 parent 50ee170 commit 3166904

File tree

1 file changed

+1
-28
lines changed

1 file changed

+1
-28
lines changed

apps/language_server/lib/language_server/providers/completion.ex

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -67,33 +67,6 @@ defmodule ElixirLS.LanguageServer.Providers.Completion do
6767
"ExUnit.Assertions"
6868
])
6969

70-
@ignore_module_attrs [
71-
"@after_compile",
72-
"@before_compile",
73-
"@behaviour",
74-
"@callback",
75-
"@compile",
76-
"@deprecated",
77-
"@dialyzer",
78-
"@doc",
79-
"@enforce_keys",
80-
"@external_resource",
81-
"@file",
82-
"@impl",
83-
"@macrocallback",
84-
"@moduledoc",
85-
"@on_definition",
86-
"@on_load",
87-
"@opaque",
88-
"@optional_callbacks",
89-
"@since",
90-
"@spec",
91-
"@type",
92-
"@typedoc",
93-
"@typep",
94-
"@vsn"
95-
]
96-
9770
@keywords %{
9871
"end" => "end",
9972
"do" => "do\n\t$0\nend"
@@ -181,7 +154,7 @@ defmodule ElixirLS.LanguageServer.Providers.Completion do
181154
name_only = String.trim_leading(name, "@")
182155
insert_text = if String.starts_with?(prefix, "@"), do: name_only, else: name
183156

184-
if name in @ignore_module_attrs or name == prefix do
157+
if name == prefix do
185158
nil
186159
else
187160
%__MODULE__{

0 commit comments

Comments
 (0)