如何在Intellisense中禁用JavaScript浏览器API建议 [英] How to disable JavaScript browser API suggestions in Intellisense
问题描述
如何在VSCode中禁用Web API建议?例如,如果我输入id,我会得到一堆IndexDB建议。如果可能,我想禁用它。
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.
谢谢!
推荐答案
是的VS代码默认包含javascript中的DOM完成。要禁用此功能,请创建 jsconfig.json
在项目的根目录下设置lib
到es6
:
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/*"
]
}
这告诉VS Code的intellsenese在提供时只包含标准的es6库类型intellisense。
This tells VS Code's intellsenese to only include the standard es6 library typings when providing intellisense.
您可以找到有关支持的更多信息lib
设置这里
You can find more information on support "lib"
settings here
这篇关于如何在Intellisense中禁用JavaScript浏览器API建议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!