I\'ve enabled the default \"log\" snippet in VS Code. I also added another snippet. Neither show up when I type their prefixes. I have set editor.tabCompletion
to t
For those who are looking for overriding default snippet (log)
Overriding the log.json file snippet was not working for me in User Snippets (For Typescript at least).
Solution: I created a new global snippet ( File > Preferences > User Snippets > New Global Snippets file ) with a different name 'clog' (full name: 'clog.code-snippets') and prefix and it worked.
There are a couple of ways you can fix this problem. The problem is Intellisense is getting in the way or default putting your snippets at the bottom of the list.
First I played with the suggestion delay, but then I settled on having Intellisense put my snippets in the top of the list of suggestions with the snippetSuggestions
user preference:
{
"editor.tabCompletion": true,
"editor.snippetSuggestions": "top"
}
My problem was that some snippets worked, and others dont. (like: JavaScript Snippets worked well)
My issue solved when i installed a plugin that added the respective, specific filetype association (im my case: *.blade.php)
When creating UserSnippets at blade.json it worked fine.
Select the first option
Don't forget to specify the language in global snippet. In my case it fixed.
{
"Print to console": {
"scope": "javascript,vuex,vue",
"prefix": "debes",
"body": [
"// eslint-disable-next-line",
"debugger;"
],
"description": "Log output to console"
}
}
For react with typescript, I had to specifically add 'typescriptreact' to the scope.
"scope": "javascript, typescript, typescriptreact"