Some food for thought Robert.
Postfix completion on the dot . operator then keyword is working well for me as it keeps a continuous workflow / momentum. The pictures below tell the story for your JavaScript. Perhaps a mix with Andrey’s suggestion would get it working snippet<–register<–postfix.
if-else block

Cya ![]()
JetBrains GoLand Blog: Increase productivity with Custom Postfix Completion templates.
