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)
|
||||
{
|
||||
case InternalFunctionVariableSymbol internalFunctionVariableSymbol:
|
||||
data.Add("varCount", internalFunctionVariableSymbol.FunctionParameters.Length);
|
||||
data.Add("varCount", internalFunctionVariableSymbol.FunctionParameters.Count(x => !x.IsOptional));
|
||||
break;
|
||||
case ScriptFunctionVariableSymbol scriptFunctionVariableSymbol:
|
||||
data.Add("varCount", scriptFunctionVariableSymbol.Parameters.Length);
|
||||
|
@ -268,7 +268,7 @@ namespace UpsilonLanguageServer.Services
|
|||
{
|
||||
var fun = (UserDataBoundMethod)property;
|
||||
kind = CompletionItemKind.Function;
|
||||
data.Add("varCount", fun.Parameters.Length);
|
||||
data.Add("varCount", fun.Parameters.Count(x => !x.IsOptional));
|
||||
}
|
||||
|
||||
const string documentation = "";
|
||||
|
|
Loading…
Reference in New Issue