I am using
provideCompletionItems
and giving it suggestion list i want to know how i can add a callback when user select a particular item.
this is how my suggestion look like
{
label: 'apple',
insertText:'apple',
kind: monaco.languages.CompletionItemKind.Event,
insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,
command: {
id: 'editor.action.triggerSuggest',
title: 'operator_additional_suggestions',
},
range,
documentation: keyword?.description,
}
You can pass arguments to the command object like so;
and access it in the registered command;