Only automatically fill out the parameters that are not optionals
This commit is contained in:
parent
37b3fe3680
commit
bab3cff7df
|
@ -239,7 +239,7 @@ namespace UpsilonLanguageServer.Services
|
||||||
switch (fun)
|
switch (fun)
|
||||||
{
|
{
|
||||||
case InternalFunctionVariableSymbol internalFunctionVariableSymbol:
|
case InternalFunctionVariableSymbol internalFunctionVariableSymbol:
|
||||||
data.Add("varCount", internalFunctionVariableSymbol.FunctionParameters.Length);
|
data.Add("varCount", internalFunctionVariableSymbol.FunctionParameters.Count(x => !x.IsOptional));
|
||||||
break;
|
break;
|
||||||
case ScriptFunctionVariableSymbol scriptFunctionVariableSymbol:
|
case ScriptFunctionVariableSymbol scriptFunctionVariableSymbol:
|
||||||
data.Add("varCount", scriptFunctionVariableSymbol.Parameters.Length);
|
data.Add("varCount", scriptFunctionVariableSymbol.Parameters.Length);
|
||||||
|
@ -268,7 +268,7 @@ namespace UpsilonLanguageServer.Services
|
||||||
{
|
{
|
||||||
var fun = (UserDataBoundMethod)property;
|
var fun = (UserDataBoundMethod)property;
|
||||||
kind = CompletionItemKind.Function;
|
kind = CompletionItemKind.Function;
|
||||||
data.Add("varCount", fun.Parameters.Length);
|
data.Add("varCount", fun.Parameters.Count(x => !x.IsOptional));
|
||||||
}
|
}
|
||||||
|
|
||||||
const string documentation = "";
|
const string documentation = "";
|
||||||
|
|
Loading…
Reference in New Issue