I wonder if there is any VsCode API that supports custom code generation other than snippets and Emmet? Snippets work fine in general, but I need more flexibility by being able insert some pieces of text based on a given context.
I tried snippets, which are powerful, but have some limitations.