Files
nexus/wiki/concepts/nav.index.jsonl.md
2026-05-03 05:42:12 +08:00

1.7 KiB
Raw Blame History

title, type, tags, sources, last_updated
title type tags sources last_updated
nav.index.jsonl concept
code-navigation
symbol-index
LSP
JSONL
semantic-graph
lsp-index-engineer.md
2026-04-29

Definition

nav.index.jsonl 是 LSP/Index Engineer 定义的导航索引文件格式,以 JSONL每行一条 JSON 记录)流式存储每个符号的导航信息,用于快速符号查找和代码导航服务。

Format Specification

Symbol Definition Record

{"symId":"sym:AppController","def":{"uri":"file:///src/controllers/app.php","l":10,"c":6}}

记录符号定义位置:symId(符号唯一 IDdef.uri(文件 URIdef.l(行号)、def.c(列号)

Symbol References Record

{"symId":"sym:AppController","refs":[
  {"uri":"file:///src/routes.php","l":5,"c":10},
  {"uri":"file:///tests/app.test.php","l":15,"c":20}
]}

记录符号所有引用位置

Hover Documentation Record

{"symId":"sym:useState","hover":{"contents":{"kind":"markdown","value":"```typescript\nconst [state, setState] = useState()\n```\nReact state hook"}}}

记录符号的悬停文档内容

Core Properties

  • 流式写入:每次增量更新追加新记录,无需全量重建
  • 原子性更新:确保图谱从不处于不一致状态
  • 快速查询:通过 symId 直接索引O(1) 查找
  • LSIF 兼容:支持导入/导出 Language Server Index Format 预计算数据

Connections