简体   繁体   中英

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.

在此处输入图片说明

Thanks!

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM