Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Cocos Symbol ParserNew to Visual Studio Code? Get it now.
Cocos Symbol Parser

Cocos Symbol Parser

flyingkisser

|
25 installs
| (0) | Free
parse symbols in cocos creator project
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CocosSymbol README

In the cocos creator project, sometimes you don't have to import * as foo from './bar' to use the function defined in bar. You may use the object method to define the function in bar, such as
foo={ someFunc1:function(){}}
At this time, the symbol cannot be parsed in vscode, and the definition jump cannot be performed.
The main purpose of the CocosCreatorSymbol plug-in is to parse all js or ts files in the current project directory
(excluding *.d.ts, release directory, debug directory, min.js, asm.js),

parse the symbols defined in them, and match the symbols according to certain rules to accurately find its original definition.
If you have any bugs or functional requirements, please contact flyingkisser@163.com.
Pure spare time maintenance, no guarantee of functional integrity or timely response, but a loving heart :)
There is no need to parse the symbol first.
When you use the shortcut key cmd+d to search for symbols for the first time, if there is no symbol file,
it will be automatically parsed.

The shortcut key for forcing the symbol file to be parsed is cmd+shift+1.
Default shortcut keys:
1、Search for symbols: cmd+d
2、Parse all: cmd+shift+1

You can create a symbolic link in the current project and link the engine directory to index the engine symbol.
mkdir scripting
cd scripting
ln -s /Users/xxx/cocos-engine-git/cocos engine
ln -s /Users/xxx/cocos-engine-git/native native

用于解决cocos creator项目中,当不使用import * as foo from './bar'时,或者使用全局变量,或者使用命名空间时,无法找到函数定义的问题。

可以把引擎目录链接到当前项目,这样就可以全局索引引擎代码的各种符号定义。
会在项目根目录生成文件symbols.index,用于保存所有符号定义。
支持CocosCreator3.x

基本功能:
1、符号跳转(ctrl+d) 2、函数调用时,显示参数提示(输入函数名(时触发)) 3、类成员或对象成员提示 (输入类名.时触发)) 4、查找符号的引用 (ctrl+r) 5、当前类或对象的成员列表 (打开js或ts文件时自动触发,在界面左边的窗口,Explorer那个界面,有一栏叫CocosSymbol ClassView)

Features

符号定位
goto symbol definition
image
函数参数提示
function call parameter prompt
image

Requirements

cd ~/.vscode/extensions/flyingkisser.cocossymbol-0.0.x npm install
or cnpm install if you're in China restart your vscode [must!]

Extension Settings

no settings

Known Issues

n/a

0.0.6

can convert old cocos class def to new creator def cmd+shift+2 some bug fix

0.0.5

Add class or object structure view some bug fix

0.0.4

some bug fix

0.0.3

Add reference search for function symbols

0.0.2

Add prompts for function parameters when calling functions Add prompts for members of class or namespace when calling someObject. or someNamespace.

0.0.1

1.parse all symbols in current project directory
2.search symbol definition

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft