I was not familiar with snippets in VS Code but I looked at the documentation Snippets in Visual Studio Code. It says snippets are templates that make it easier to enter repeating code patterns. I also looked at the User Snippets for my VS Code. I do not have any but it does show an example just like your except you have added scope.
I do not understand what you mean by types. Perhaps there is a miscommunication by language. In that example, console.log(’$1’); is inserted into the JavaScript or TypeScript, not typed. I don’t want to be critical but I want to ensure we are communicating.
Note that your scope has parentheses. Look at the documentation/samples.
The documentation is unclear about how to name global snippets but evidently it is not very specific. Assuming the file name is correct, I think the following works for me.
Yes, ‘insert’ is the correct term. I copied your code. ‘log’ works but ‘cl’ doesn’t. To be more specific, when I type ‘log’, a short list pops up. One of the items on the list is ‘log’ with a square to its left. Choosing that item results in the correct insertion of ‘console.log();’. But if I type ‘cl’, a longer list pops up. However, there is no ‘cl’ with a square to its left to choose. Thanks.