@@ -165,28 +165,30 @@ defmodule ElixirLS.LanguageServer.Providers.Completion do
165
165
|> sort_items ( )
166
166
167
167
# add trigger signatures to arity 0 if there are higher arity completions that would trigger
168
- commands = items
169
- |> Enum . filter ( & & 1 . kind in [ :function , :class ] )
170
- |> Enum . group_by ( & { & 1 . kind , & 1 . label } )
171
- |> Map . new ( fn { key , values } ->
172
- command = Enum . find_value ( values , & & 1 . command )
173
- { key , command }
174
- end )
168
+ commands =
169
+ items
170
+ |> Enum . filter ( & ( & 1 . kind in [ :function , :class ] ) )
171
+ |> Enum . group_by ( & { & 1 . kind , & 1 . label } )
172
+ |> Map . new ( fn { key , values } ->
173
+ command = Enum . find_value ( values , & & 1 . command )
174
+ { key , command }
175
+ end )
175
176
176
- items = items
177
- |> Enum . map ( fn
178
- % { command: nil , kind: kind } = item when kind in [ :function , :class ] ->
179
- command = commands [ { kind , item . label } ]
180
- if command do
181
- % { item |
182
- command: command ,
183
- insert_text: "#{ item . label } ($1)$0"
184
- }
185
- else
177
+ items =
178
+ items
179
+ |> Enum . map ( fn
180
+ % { command: nil , kind: kind } = item when kind in [ :function , :class ] ->
181
+ command = commands [ { kind , item . label } ]
182
+
183
+ if command do
184
+ % { item | command: command , insert_text: "#{ item . label } ($1)$0" }
185
+ else
186
+ item
187
+ end
188
+
189
+ item ->
186
190
item
187
- end
188
- item -> item
189
- end )
191
+ end )
190
192
191
193
items_json =
192
194
items
@@ -658,7 +660,7 @@ defmodule ElixirLS.LanguageServer.Providers.Completion do
658
660
659
661
signature_help_supported? = Keyword . get ( options , :signature_help_supported , false )
660
662
signature_after_complete? = Keyword . get ( options , :signature_after_complete , true )
661
-
663
+
662
664
trigger_signature? = signature_help_supported? && arity > 1
663
665
664
666
command =
0 commit comments