@@ -141,7 +141,7 @@ export async function complete(
141141 func . description = getFunctionDescription ( func . name ) ;
142142 }
143143
144- return getExpressionCompletionItems ( token , context , extensionFunctions , newPos ) ;
144+ return getExpressionCompletionItems ( token , context , extensionFunctions , newPos , config ?. featureFlags ) ;
145145 }
146146
147147 const indentation = guessIndentation ( newDoc , 2 , true ) ; // Use 2 spaces as default and most common for YAML
@@ -531,7 +531,8 @@ function getExpressionCompletionItems(
531531 token : TemplateToken ,
532532 context : DescriptionDictionary ,
533533 extensionFunctions : FunctionInfo [ ] ,
534- pos : Position
534+ pos : Position ,
535+ featureFlags ?: FeatureFlags
535536) : CompletionItem [ ] {
536537 if ( ! token . range ) {
537538 return [ ] ;
@@ -550,8 +551,8 @@ function getExpressionCompletionItems(
550551 const expressionInput = ( getExpressionInput ( currentInput , cursorOffset ) || "" ) . trim ( ) ;
551552
552553 try {
553- return completeExpression ( expressionInput , context , extensionFunctions , validatorFunctions ) . map ( item =>
554- mapExpressionCompletionItem ( item , currentInput [ cursorOffset ] )
554+ return completeExpression ( expressionInput , context , extensionFunctions , validatorFunctions , featureFlags ) . map (
555+ item => mapExpressionCompletionItem ( item , currentInput [ cursorOffset ] )
555556 ) ;
556557 } catch ( e ) {
557558 error ( `Error while completing expression: '${ ( e as Error ) ?. message || "<no details>" } '` ) ;
0 commit comments