Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable JavaScript browser API suggestions in Intellisense

How does one disable web API suggestions in VSCode? Eg, if I type "id" I get a bunch of IndexDB suggestions. I'd like to disable this if possible.

enter image description here

Thanks!

like image 529
Dana Woodman Avatar asked Mar 05 '23 19:03

Dana Woodman


1 Answers

Yes VS Code includes DOM completions in javascript by default. To disable this, create a jsconfig.json at the root of your project and set "lib" to "es6":

{
    "compilerOptions": {
        "target": "ES6",
        "lib": ["es6"]
    },
    "exclude": [
        "node_modules",
        "**/node_modules/*"
    ]
}

This tells VS Code's intellsenese to only include the standard es6 library typings when providing intellisense.

You can find more information on support "lib" settings here

like image 87
Matt Bierner Avatar answered Mar 09 '23 07:03

Matt Bierner