completion with parameters

Hello,

I want use autocompletion but for create my option i need to put “categorie” parameters to my completeVariable function. How I can do it? thanks in advance for you awnser.

		this.extensionsConfig = [
			autocompletion({
				activateOnTyping: false,
				override: [this.completeVariable]
			}),
			json()
		];

	completeVariable(context: CompletionContext, **categorie: string)**: CompletionResult {
		const word = context.matchBefore(/\w*/);
		if (word.from == word.to && !context.explicit) {
			return null;
		}

		const options: Completion[] = [];
                // I need external category to set options
		return {
			from: word.from,
			options: options
		};