Monaco Editor SignatureHelpProvider Implementation

Viewed 282

I have been digging around for quite some time now trying to find a working example to implement a SignatureHelpProvider in typescript for a custom programming language used internally within my company.

In my time so far I have a minimally working example that provides "Parameter Hints" (another name for what the SignatureHelpProvider result is) for methods like:

ADD(1, 2) - things work somewhat well for basic 1 level deep methods.

enter image description here

However, things are getting very complex and difficult to manage for things like:

ADD(1, ADD(1, SUBTRACT(100, 5))) etc

In doing some research, someone suggested that building an AST is the right approach for managing this type of project. However, I have not been able to find any complete examples online for implementing SignatureHelpProvider with a custom programming language.

Does anyone know of a good resource / example to use for implementing SignatureHelpProvider in a custom programming language?

Have reviewed the online docs extensively, and poured over VS Code's internal implementation, no dice so far. (https://github.com/Microsoft/monaco-typescript/blob/master/src/languageFeatures.ts#L369 & https://microsoft.github.io/monaco-editor/api/interfaces/monaco.languages.signaturehelpprovider.html#providesignaturehelp)

0 Answers
Related