Search code examples
javascriptvisual-studio-codecode-snippets

Visual Studio Code - How to show user snippets on top of other suggestions?


I have created a JavaScript 'user snippet' in the Visual Studio Code to make it slightly faster to call the console.log() method (a line of code that I write very frequently).

"Console Log": {
    "prefix": "log",
    "body": [
        "console.log($0);"
    ],
    "description": "JavaScript Console.log()"
}

The user snippet works, but when I type log into the editor, my custom snippet is at the bottom of the list.

'log' is at the bottom of the list

Is there any way I can make this the first suggestion, rather than the last?


Solution

  • Try setting:

    "editor.snippetSuggestions": "top"
    

    enter image description here