我已经尝试过了:
Visual Studio Code中的JQuery智能感知
和这个:
shrekshao.github.io/2016/06/20/vscode-01/
但是它什么也没做,VS Code不会添加jquery intellisense,我已经尝试解决了好几个小时了,但是它却无法正常工作
But it does nothing, VS Code just won't add jquery intellisense, I've been trying to solve this for hours but it just won't work
推荐答案大多数博客帖子现在已过时,因为我们终于有了1.8+版的自动类型获取功能-您不再需要自己安装键入内容.
Most of the blog postings are now outdated, as we finally have automatic type acquisition with version 1.8+ - you no longer need to install the typings yourself.
我建议您阅读官方文档,该文档始终是最新的: code.visualstudio/docs/languages/javascript
I recommend reading the official documentation, its always up to date: code.visualstudio/docs/languages/javascript
如果您使用npm并在项目中包含 package.json ,并且jQuery列在其中,则它应该已经可以工作.
If you use npm and have a package.json in your project and jQuery is listed there, it should already work.
如果您不使用npm,则可以在项目根目录中创建文件 jsconfig.json ,其中包含以下内容,您可以使用:
If you do not use npm, you can create the file jsconfig.json in the project root with the following content and you are good to go:
{ "typeAcquisition": { "include": [ "jquery" ] } }更多推荐
VS Code中的jQuery intellisense
发布评论