修复: read_symbol 搜不到 const 声明的符号

- 新增 variable_declarator 到 DEFINITION_KINDS
- Vue 3 + TS 大量使用 const fn = () => {} 箭头函数
  AST 节点是 variable_declarator,原本不在列表中
  导致 read_symbol 对 Vue 文件频繁 fallback 回 read_file
This commit is contained in:
2026-06-27 23:42:14 +08:00
parent 7cd833b1e5
commit 6212002270

View File

@@ -39,6 +39,8 @@ const DEFINITION_KINDS: &[&str] = &[
"interface_declaration",
"enum_declaration",
"method_definition",
// TS/JS const/let/var 声明(如 const fn = () => {})
"variable_declarator",
// Go
"method_declaration", // Go method(receiver func)
"type_declaration", // Go type Xxx struct/interface/func