[英]Migrating intellisense from Visual Studio 2015 to VSCode
Hi, 嗨,
In VS2015 I had excellent intellisense support through the use of intellisense.js reference files dotted through out the project. 在VS2015中,我通过使用遍布项目的intellisense.js参考文件获得了极好的智能感知支持。 These combined with JsDoc notation ensured that all my non-library code had intellisense support.
这些结合JsDoc表示法确保我的所有非库代码都具有intellisense支持。
/// <reference path="hudtimer.js" />
/// <reference path="intellisense.js" />
/// <reference path="menulayergametimers.js" />
/// <reference path="menulayerstreakidentifier.js" />
/// <reference path="streakidentifier.js" />
/// <reference path="menulayerpop.js" />
/// <reference path="popentity.js" />
/// <reference path="popentityfactory.js" />
/// <reference path="popactions.js" />
/// <reference path="menulayerpophud.js" />
/// <reference path="popquestion.js" />
/// <reference path="popcharacter.js" />
/// <reference path="popvfxmanager.js" />
In VSCode, these files are essentially ignored which results in very poor intellisense. 在VSCode中,这些文件基本上被忽略,导致智能感知非常差。 It seems to prefer TypeScript definitions, which is not something I've really looked into before and could potentially consume an enormous amount of time to create/generate for each file in the code base (big project!)
它似乎更喜欢TypeScript定义,这不是我以前真正研究的东西,可能会花费大量时间为代码库中的每个文件创建/生成(大项目!)
Is there a way to force/coax VSCode into using the already set-up intellisense.js files? 有没有办法强制/哄VSCode使用已设置的intellisense.js文件?
Try creating a jsconfig.json
file at the root of your project with the contents: 尝试使用以下内容在项目的根目录下创建
jsconfig.json
文件:
{
"compilerOptions": {
"target": "ES6"
},
"exclude": [
"node_modules",
"**/node_modules/*"
]
}
This file should ensure that all js file in your workspace—including intellisense.js
—are picked up and included in the same JavaScript project. 此文件应确保工作区中的所有js文件(包括
intellisense.js
)都被选中并包含在同一个JavaScript项目中。
In the future, I also recommend you try to migrate away from using a reference
paths file to using the jsconfig
to define your project structure 将来,我还建议您尝试从使用
reference
路径文件迁移到使用jsconfig
定义项目结构
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.