如何在 Visual Studio 代码中启用智能感知?

how to enable intellisense in Visual Studio Code?

我一直在尝试在 VS Code 中激活 IntelliSense。

当我执行 gulp. 时,它没有给我 task

这样的选项

您需要安装 gulp 的打字文件。我也不确定 intellisense 是否可以在没有外部模块打字稿的情况下工作。

npm i -g typings
typings init
typings install gulp --save-dev

安装打字后:

typings install dt~gulp --global // --ambient deprecated use --global

然后点击VSC右下角的绿色灯泡,添加一个jsconfig.json文件

查看:

https://code.visualstudio.com/docs/runtimes/nodejs#_adding-a-jsconfigjson-configuration-file

您不必使用

///

再...此外,您可能需要关闭(使用 "x")gulpfile.js、jsconfig.json 和 package.json 在 "Working Files" jsconfig.json 识别工作区。