0

I have this problem that showed up today. I have a bunch of snippets I use for javascript, and till yesterday I would use them by typing snippet name, and then tabbing to use it.

Now, it would only show if I type first 2 characters of its name. If I type a third one, I will not show as a suggestion.

This are a couple of my snippets:

"event-listener": {
    "prefix": "event-listener", 
    "body": [
       "${1:elem}.addEventListener('${2:click}', e => { ", 
       "    $3 ", 
       "});"
    ]
}, 

"try-catch": {
        "prefix": "try-catch", 
        "body": [
            "try {", 
            "    $1", 
            "}", 
            "catch (error) {", 
            "    console.log(error); ", 
            "}"
        ]
    }, 

If I typed ev for the first one, it would display as suggetion. If I typed eve, then it would show default VSCode suggestions. Same for if I typed tr (it would show my snippet), and try (it wouldn't).

1 Answer 1

0

Well, I was reading some similar questions, and tried restarting VSCode, and it worked. Hope someone finds this helpful.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.