Open zachallaun opened 2 weeks ago
Regarding sorting: Currently function/2
and function(arg1, arg2)
return the same sort text.
Regarding prefixing labels with &
: maybe this shouldn't be done, as it confuses things somewhat for qualified captures:
&Enum.reduce_w|
# completions:
# reduce_while/3
# reduce_while(enumerable, acc fun)
It might be confusing for the completions to include &
, e.g. &reduce_while/3
, since what we're really completing is &Enum.reduce_while/3
.
Completions in a capture context can be improved in a number of ways. In the following examples, consider that you have a
function/1
andfunction/2
in scope.Improve labels
If we're in a capture context, it would be nice if completions started with
&
to indicate that it is being considered in the completion responses.Using additional
&fun/arity
contextWhen
/arity
is present, it should be used to improve completions.Additionally:
function/2
inserts an additional/2
, resulting in&function/2/2
. It should emit a text edit resulting in&function/2
. The same issue exists withfunction/1
, which currently results in&function/1/2
.function(arg1, arg2)
results in&function(arg1, arg2)/2
. It should remove the/2
.Using additional
&fun(arg)
contextWhen
(arg, ...)
is present, it should be used to improve completions.Additionally:
&function(arg1, arg2)
inserts additional args, resulting in&function(arg1, arg2)(&1, arg)
. It should emit a text edit resulting in&function(arg1, arg2)
.