ccc坑-不出现智能代码提示了

it2025-12-02  5

不出现智能代码提示了

关键词:Cocos CocosCreator

1. 要排除大文件

问题

提示jsconfig.json中Problems loading refer… ,而且过会会提示

To enable project-wide JavaScript/TypeScript language features, exclude large folders with source files that you do not work on.

拙劣翻译:

为了确保工程范围内可以使用JS/TS功能,要排除那些有你用不到的带源文件的文件夹

意思就是要排除大文件

解决

在根目录下有jsconfig.json文件

{ "compilerOptions": { "target": "es6", "module": "commonjs", "experimentalDecorators": true }, "exclude": [ "node_modules", ".vscode", "library", "local", "settings", "temp", "build" // 这里是新加上去的 ] }

2. 相关提示文件损坏

主要是根目录下的creator.d.ts jsconfig.json文件出问题

在CCC中开发者 -> vs code 工作流 -> 更新 vs code 智能提示数据更新

3. Typescript 与 Javascript 提示冲突

问题

可能有些人误点了加开发者 -> vs code 工作流 -> 添加 Typescript 项目配置,根目录会生成tsconfig.json,这与jsconfig.json冲突

解决

删掉tsconfig.json

最新回复(0)