Would it possible to specify additional alternative apply functions for commit characters of Completion?
Currently when pressing one of the committing characters the apply function is called before inserting the character (at least to my understanding).
It would be nice to be able to provide custom apply function for commit characters, something like
let completion: Completion = {
label: 'completion label',
apply: () => {
console.log(
'default apply function called when accepting the suggestion'
);
},
commitCharacters: [
'a', // if 'a' is pressed then the regular apply function will be called
{
key: '#',
apply: (
view: EditorView,
completion: Completion,
from: number,
to: number
) => {
console.log(
'alternative apply function when pressing #'
);
}
}
]
};