Update nexus wiki content

This commit is contained in:
2026-05-03 05:42:06 +08:00
parent 90f3811b83
commit 111bc65b7b
707 changed files with 32306 additions and 7289 deletions

View File

@@ -0,0 +1,45 @@
---
title: "nav.index.jsonl"
type: concept
tags: ["code-navigation", "symbol-index", "LSP", "JSONL", "semantic-graph"]
sources: ["lsp-index-engineer.md"]
last_updated: 2026-04-29
---
## Definition
nav.index.jsonl 是 LSP/Index Engineer 定义的导航索引文件格式,以 JSONL每行一条 JSON 记录)流式存储每个符号的导航信息,用于快速符号查找和代码导航服务。
## Format Specification
### Symbol Definition Record
```jsonl
{"symId":"sym:AppController","def":{"uri":"file:///src/controllers/app.php","l":10,"c":6}}
```
记录符号定义位置:`symId`(符号唯一 ID`def.uri`(文件 URI`def.l`(行号)、`def.c`(列号)
### Symbol References Record
```jsonl
{"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
```jsonl
{"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
- [[nav.index.jsonl]] ← is_format_of ← [[SemanticCodeGraph]]
- [[nav.index.jsonl]] ← built_by ← [[GraphDaemon]]
- [[nav.index.jsonl]] ← uses ← [[IncrementalGraphUpdate]]
- [[nav.index.jsonl]] ← can_be_exported_as ← [[LSIF]]