I'm using Monaco 0.22.2 trying to bring up suggestions for function parameters. I've defined a simple example like so:
monaco.languages.registerSignatureHelpProvider('myCustomLang', {
signatureHelpTriggerCharacters: ['(', ','],
provideSignatureHelp: (model, position, token) => {
return {
activeParameter: 0,
activeSignautre: 0,
signatures: [{
label:'string of_string(string $string, int $start)',
parameters: [
{
label: 'string $string',
documentation: 'The input string'
},
{
label: 'int $start',
documentation: "if $start is non-negative...",
}
]
}]
};
}
});
However as soon as I type in "(" or "," to trigger this code, I get the error:
Cannot read property 'signatures' of undefined
TypeError: Cannot read property 'signatures' of undefined
at ParameterHintsModel.eval (parameterHintsModel.js:166)
at Generator.next (<anonymous>)
at fulfilled (parameterHintsModel.js:19)
at eval (errors.js:24)
What am I doing wrong? My regular simple suggestions show up, but I can't get potential function parameter suggestions to show up.